<template>
  <div>
    <van-notice-bar
      left-icon="volume-o"
      text="教育局发布填写规则及其他通知"
      v-if="false"
    />

    <van-dialog v-model="messageListShow">
      <div class="message-title">学校公告</div>
      <div class="message-card">
        <div v-for="(item, index) in messageList" :key="index">
          <van-field
            autosize
            readonly
            type="textarea"
            v-model="index + 1 + '）' + item.content"
          ></van-field>
        </div>
      </div>
    </van-dialog>

    <div class="container">
      <van-popup
        round
        v-model="popupShow"
        @close="popupClose"
        position="bottom"
      >
        <template v-if="popupState == 'picker'">
          <van-picker
            show-toolbar
            :columns="pickerData"
            @confirm="pickerConfirm"
            @cancel="pickerCancel"
            ><template
              v-if="
                pickerType == 'dl_abroad_specific_placeArr' ||
                pickerType == 'abroad_specific_placeArr'
              "
              #columns-top
            >
              <van-search
                v-model="data.search"
                placeholder="可模糊检索"
                @input="searchChange(pickerType)"
                class="search-body"
              ></van-search> </template
          ></van-picker>
        </template>
        <template v-if="popupState == 'datePicker'">
          <van-datetime-picker
            type="date"
            title="请选择年月日"
            :min-date="minDate"
            :max-date="maxDate"
            @confirm="datePickerConfirm"
            @cancel="datePickerCancel"
          >
          </van-datetime-picker>
        </template>
        <template v-if="popupState == 'dateTimePicker'">
          <van-datetime-picker
            type="datetime"
            title="选择时间"
            :min-date="minDateTime"
            :max-date="maxDateTime"
            @confirm="dateTimePickerConfirm"
            @cancel="dateTimePickerCancel"
          >
          </van-datetime-picker>
        </template>
        <template v-if="popupState == 'cascader'">
          <van-cascader
            :field-names="fieldNames"
            v-model="cascaderValue"
            title="请选择所属区域"
            :options="cascadeOptions"
            active-color="#D58913"
            @finish="cascaderFinish"
            @close="cascaderClose"
          />
        </template>
        <template v-if="popupState == 'map'">
          <Map
            v-if="popupState == 'map'"
            @getLngLat="getLngLat"
            :data="formData[0]"
          ></Map>
        </template>
        <template v-if="popupState == 'gtjzz'">
          <div style="height: 80vh; background: #f2f7fb">
            <Resident
              v-if="popupState == 'gtjzz'"
              @getResident="getResident"
              :resident_id="resident_id"
            ></Resident>
          </div>
        </template>
      </van-popup>
      <div class="container-inner">
        <div class="card school mt20" v-if="fillingList.length > 0">
          <div class="card-bar">
            <div class="card-bar-title">动态填报信息</div>
          </div>
          <div class="card-container">
            <van-field
              v-for="fillingItem in fillingList"
              :readonly="route.showType == 'detail'"
              :key="fillingItem.id"
              clearable
              required
              :rules="[
                {
                  required: true,
                  message: '请检查' + fillingItem.filling_contents,
                },
              ]"
              :name="fillingItem.key_num"
              v-model="formData[0][fillingItem.key_num]"
              :label="fillingItem.filling_contents"
              :placeholder="'请输入' + fillingItem.filling_contents"
            >
              <template #label>
                <div
                  v-if="fillingItem.filling_contents.length > 5"
                  class="field-title"
                  style="line-height: normal !important; text-align: left"
                >
                  {{ fillingItem.filling_contents }}
                </div>
                <div
                  v-if="fillingItem.filling_contents.length <= 5"
                  class="field-title"
                >
                  {{ fillingItem.filling_contents }}
                </div>
              </template>
            </van-field>
          </div>
        </div>
        <van-form
          ref="form"
          label-width="110px"
          scroll-to-error
          :show-error-message="false"
          @failed="onFailed"
          @submit="onSubmit"
        >
          <div class="card base">
            <div class="card-bar">
              <div class="card-bar-title">基础信息</div>
            </div>
            <div class="card-container">
              <van-field
                v-model="formData[0].name"
                clearable
                maxlength="20"
                readonly
                :rules="[{ required: true, message: '请检查姓名' }]"
                name="name"
                input-align="right"
                placeholder="请输入姓名"
              >
                <template #label>
                  <div class="field-title">姓名</div>
                </template>
              </van-field>
              <van-field
                v-if="route.showType !== 'detail'"
                v-model="formData[0].mobile"
                clearable
                maxlength="11"
                readonly
                :rules="[{ required: true, message: '请检查联系方式' }]"
                name="mobile"
                type="mobile"
                input-align="right"
                placeholder="请输入联系方式"
              >
                <template #label>
                  <div class="field-title">联系方式</div>
                </template>
              </van-field>
              <van-field
                v-model="formData[0].card_no"
                clearable
                maxlength="18"
                readonly
                :rules="[{ required: true, message: '请检查身份证号' }]"
                name="card_no_tmd"
                input-align="right"
                placeholder="请输入身份证号"
              >
                <template #label>
                  <div class="field-title">身份证号</div>
                </template>
              </van-field>
              <van-field
                v-model="formData[0].c_date"
                clearable
                maxlength="18"
                readonly
                :rules="[{ required: true, message: '请检查填报日期' }]"
                name="c_date"
                input-align="right"
                placeholder="请输入填报日期"
              >
                <template #label>
                  <div class="field-title">填报日期</div>
                </template>
              </van-field>
              <van-field
                v-model="formData[0].hsjcsj || '无'"
                readonly
                name="hsjcsj"
                @click="pickerChange('hsjcsj', 'formData', 0)"
                input-align="right"
              >
                <template #label>
                  <div class="field-title">核酸检测时间</div>
                </template>
              </van-field>
              <van-field
                v-model="formData[0].ym_time || '无'"
                readonly
                name="ym_time"
                input-align="right"
              >
                <template #label>
                  <div class="field-title">疫苗接种情况</div>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].school_name"
                v-model="formData[0].school_name"
                readonly
                name="school_name"
                input-align="right"
              >
                <template #label>
                  <div class="field-title">所属学校</div>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].grade_name"
                v-model="formData[0].grade_name"
                readonly
                name="ym_time"
                input-align="right"
              >
                <template #label>
                  <div class="field-title">所属年级</div>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].class_name"
                v-model="formData[0].class_name"
                readonly
                name="ym_time"
                input-align="right"
              >
                <template #label>
                  <div class="field-title">所属班级</div>
                </template>
              </van-field>
            </div>
          </div>

          <div class="card address mt20" v-if="route.showType !== 'detail'">
            <div class="card-bar">
              <div class="card-bar-title">今日住址</div>
            </div>
            <div class="card-container">
              <van-field
                readonly
                clickable
                is-link
                name="ascription"
                :value="formData[0].ascription"
                placeholder="点击选择"
                @click="pickerChange('ascription', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查今日所属区域' }]"
              >
                <template #label>
                  <div class="field-title">今日所属区域</div>
                </template>
              </van-field>
              <van-field
                :readonly="route.showType == 'detail'"
                v-model="formData[0].quarter"
                clearable
                maxlength="20"
                name="quarter"
                placeholder="请输入今日所属小区"
              >
                <template #label>
                  <div class="field-title">今日所属小区</div>
                  <div class="field-text">(或住宅楼名)</div>
                </template>
              </van-field>
              <van-field
                :readonly="route.showType == 'detail'"
                v-model="formData[0].address"
                rows="3"
                autosize
                type="textarea"
                maxlength="255"
                placeholder="请输入今日详细地址"
              >
                <template #label>
                  <div class="field-title">今日详细地址</div>
                </template>
              </van-field>
              <van-field name="loc">
                <template #label>
                  <div class="field-title">今日地址坐标</div>
                  <div class="field-text">(可选)</div>
                </template>
                <template #input>
                  <div class="w100 h100 mid">
                    <van-button
                      :disabled="route.showType == 'detail'"
                      class="margin-l-auto"
                      native-type="button"
                      size="small"
                      style="width: 95px"
                      color="#D58913"
                      plain
                      @click="getLocation"
                      >获取当前位置
                    </van-button>
                    <van-button
                      :disabled="route.showType == 'detail'"
                      class="margin-l-auto"
                      native-type="button"
                      size="small"
                      style="width: 90px"
                      color="#D58913"
                      plain
                      @click="pickerChange('map', 'formData', 0)"
                      ><template #default>
                        <div>本日住所坐标</div>
                        <div>(小区内即可)</div>
                      </template>
                    </van-button>
                  </div>
                </template>
              </van-field>
            </div>
          </div>

          <div class="card condition mt20">
            <div class="card-bar">
              <div class="card-bar-title">健康状况申报</div>
            </div>
            <div class="card-container">
              <van-field
                readonly
                clickable
                is-link
                name="traffic_mode_name"
                :value="formData[0].traffic_mode_name"
                placeholder="点击选择"
                @click="pickerChange('traffic_mode', 'formData', 0)"
              >
                <template #label>
                  <div class="field-title">上学交通方式</div>
                </template>
              </van-field>
              <van-field
                name="is_healthy"
                required
                :rules="[{ required: true, message: '请检查是否健康' }]"
              >
                <template #label>
                  <div class="field-title">是否健康</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].is_healthy"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >是</van-radio
                    >
                    <van-radio name="0" :disabled="route.showType == 'detail'"
                      >否</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].is_healthy == '0'"
                name="thirty_days_symptomArr"
                required
                :rules="[{ required: true, message: '请检查十大症状' }]"
              >
                <template #label>
                  <div class="field-title">十大症状</div>
                </template>
                <template #input>
                  <van-checkbox-group
                    v-model="formData[0].thirty_days_symptomArr"
                    direction="horizontal"
                  >
                    <van-row>
                      <van-col
                        span="12"
                        v-for="discomfortItem in dict.discomfortArr"
                        :key="discomfortItem.value"
                      >
                        <van-checkbox
                          checked-color="#D58913"
                          :name="discomfortItem.value"
                          :disabled="route.showType == 'detail'"
                          shape="square"
                          >{{ discomfortItem.text }}</van-checkbox
                        >
                      </van-col>
                      <van-col span="24">
                        <van-checkbox
                          checked-color="#D58913"
                          name="嗅（味）觉减退（丧失）"
                          :disabled="route.showType == 'detail'"
                          shape="square"
                          >嗅（味）觉减退（丧失）</van-checkbox
                        >
                      </van-col>
                    </van-row>
                  </van-checkbox-group>
                </template>
              </van-field>
              <van-field
                readonly
                clickable
                is-link
                name="healthy_code_colour_name"
                :value="formData[0].healthy_code_colour_name"
                placeholder="点击选择"
                @click="pickerChange('healthy_code_colour', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查健康码颜色' }]"
              >
                <template #label>
                  <div class="field-title">健康码颜色</div>
                </template>
              </van-field>
              <van-field
                name="contact_situationArr"
                required
                :rules="[{ required: true, message: '请检查7天内接触人员' }]"
              >
                <template #label>
                  <div class="field-title">7天内接触人员</div>
                  <div class="field-text">
                    (7天内接触人员选择为 ‘新冠肺炎确诊病例或无症状感染者’ 或
                    ‘新冠肺炎疑似感染者’ 时请选择密接类型)
                  </div>
                </template>
                <template #input>
                  <van-checkbox-group
                    v-model="formData[0].contact_situationArr"
                    @change="contactSituationChange($event, 'formData', 0)"
                    direction="horizontal"
                  >
                    <van-row>
                      <van-col span="12">
                        <van-checkbox
                          :disabled="
                            (!formData[0].discomforwjc &&
                              formData[0].contact_situationArr.length > 0) ||
                            route.showType == 'detail'
                          "
                          checked-color="#D58913"
                          name="无接触"
                          shape="square"
                          >无接触</van-checkbox
                        >
                      </van-col>
                      <van-col span="12">
                        <van-checkbox
                          :disabled="
                            (!formData[0].discomforbqc &&
                              formData[0].contact_situationArr.length > 0) ||
                            route.showType == 'detail'
                          "
                          checked-color="#D58913"
                          name="不清楚"
                          shape="square"
                          >不清楚</van-checkbox
                        >
                      </van-col>
                      <van-col span="12">
                        <van-checkbox
                          :disabled="
                            ((formData[0].discomforwjc ||
                              formData[0].discomforbqc) &&
                              formData[0].contact_situationArr.length > 0) ||
                            route.showType == 'detail'
                          "
                          checked-color="#D58913"
                          name="境外人员"
                          shape="square"
                          >境外人员</van-checkbox
                        >
                      </van-col>
                      <van-col span="24">
                        <van-checkbox
                          :disabled="
                            ((formData[0].discomforwjc ||
                              formData[0].discomforbqc) &&
                              formData[0].contact_situationArr.length > 0) ||
                            route.showType == 'detail'
                          "
                          checked-color="#D58913"
                          name="重点地区人员"
                          shape="square"
                          >重点地区人员</van-checkbox
                        >
                      </van-col>
                      <van-col span="24">
                        <van-checkbox
                          :disabled="
                            ((formData[0].discomforwjc ||
                              formData[0].discomforbqc) &&
                              formData[0].contact_situationArr.length > 0) ||
                            route.showType == 'detail'
                          "
                          checked-color="#D58913"
                          name="被医学隔离观察人员"
                          shape="square"
                          >被医学隔离观察人员</van-checkbox
                        >
                      </van-col>
                      <van-col span="24">
                        <van-checkbox
                          :disabled="
                            ((formData[0].discomforwjc ||
                              formData[0].discomforbqc) &&
                              formData[0].contact_situationArr.length > 0) ||
                            route.showType == 'detail'
                          "
                          checked-color="#D58913"
                          name="发热或有呼吸道症状的患者"
                          shape="square"
                          >发热或有呼吸道症状的患者</van-checkbox
                        >
                      </van-col>
                      <van-col span="24">
                        <van-checkbox
                          :disabled="
                            ((formData[0].discomforwjc ||
                              formData[0].discomforbqc) &&
                              formData[0].contact_situationArr.length > 0) ||
                            route.showType == 'detail'
                          "
                          checked-color="#D58913"
                          name="新冠肺炎确诊病例或无症状感染者"
                          shape="square"
                          >新冠肺炎确诊病例或无症状感染者
                        </van-checkbox>
                      </van-col>
                      <van-col span="24">
                        <van-checkbox
                          :disabled="
                            ((formData[0].discomforwjc ||
                              formData[0].discomforbqc) &&
                              formData[0].contact_situationArr.length > 0) ||
                            route.showType == 'detail'
                          "
                          checked-color="#D58913"
                          name="新冠肺炎疑似感染者"
                          shape="square"
                          >新冠肺炎疑似感染者</van-checkbox
                        >
                      </van-col>
                      <van-col span="12">
                        <van-checkbox
                          :disabled="formData[0].close_flag"
                          checked-color="#D58913"
                          name="一密"
                          shape="round"
                          >一密</van-checkbox
                        >
                      </van-col>
                      <van-col span="12">
                        <van-checkbox
                          :disabled="formData[0].close_flag"
                          checked-color="#D58913"
                          name="二密"
                          shape="round"
                        >
                          二密</van-checkbox
                        >
                      </van-col>
                    </van-row>
                  </van-checkbox-group>
                </template>
              </van-field>
              <van-field
                readonly
                clickable
                is-link
                name="dl_is_has_quarantine_name"
                :value="formData[0].dl_is_has_quarantine_name"
                placeholder="点击选择"
                @click="pickerChange('dl_is_has_quarantine', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查是否进行过隔离' }]"
              >
                <template #label>
                  <!-- <div class="field-title">是否隔离</div> -->
                  <div class="field-title">最近是否隔离</div>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_has_quarantine == '1' ||
                  formData[0].dl_is_has_quarantine == '2'
                "
                name="dl_isolation_mode"
                required
                :rules="[{ required: true, message: '请检查隔离方式' }]"
              >
                <template #label>
                  <div class="field-title">隔离方式</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].dl_isolation_mode"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-row>
                      <van-col span="12">
                        <van-radio
                          name="1"
                          :disabled="route.showType == 'detail'"
                          >居家</van-radio
                        >
                      </van-col>
                      <van-col span="12">
                        <van-radio
                          name="2"
                          :disabled="route.showType == 'detail'"
                          >集中</van-radio
                        >
                      </van-col>
                      <van-col span="24" class="mt10">
                        <van-radio
                          name="3"
                          :disabled="route.showType == 'detail'"
                          >居家健康检测</van-radio
                        >
                      </van-col>
                      <van-col span="24" class="mt10">
                        <van-radio
                          name="4"
                          :disabled="route.showType == 'detail'"
                          >校内封控</van-radio
                        >
                      </van-col>
                    </van-row>
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].dl_isolation_mode == '2'"
                v-model="formData[0].dl_isolation_mode_address"
                required
                :rules="[{ required: true, message: '请检查隔离地点' }]"
                name="temperature"
                placeholder="请输入隔离地点"
              >
                <template #label>
                  <div class="field-title">隔离地点</div>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_has_quarantine == '1' ||
                  formData[0].dl_is_has_quarantine == '2'
                "
                readonly
                clickable
                is-link
                v-model="formData[0].dl_isolation_start_time"
                required
                :rules="[{ required: true, message: '请检查隔离开始时间' }]"
                name="dl_isolation_start_time"
                placeholder="点击选择"
                @click="pickerChange('dl_isolation_start_time', 'formData', 0)"
              >
                <template #label>
                  <div class="field-title">隔离开始时间</div>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_has_quarantine == '1' ||
                  formData[0].dl_is_has_quarantine == '2'
                "
                readonly
                clickable
                is-link
                v-model="formData[0].dl_isolation_end_time"
                required
                :rules="[{ required: true, message: '请检查隔离结束时间' }]"
                name="dl_isolation_end_time"
                placeholder="点击选择"
                @click="pickerChange('dl_isolation_end_time', 'formData', 0)"
              >
                <template #label>
                  <div class="field-title">隔离结束时间</div>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].dl_is_has_quarantine == '3'"
                readonly
                clickable
                is-link
                name="dl_is_nucleic_acid_test_name"
                :value="formData[0].dl_is_nucleic_acid_test_name"
                placeholder="点击选择"
                @click="pickerChange('dl_is_nucleic_acid_test', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查核酸检测情况' }]"
              >
                <template #label>
                  <!-- <div class="field-title">是否核酸检测</div> -->
                  <div class="field-title" style="padding: 0px">
                    核酸检测情况
                  </div>
                </template>
              </van-field>
              <!-- <van-field
                v-if="formData[0].dl_is_has_quarantine == '3'"
                readonly
                clickable
                is-link
                name="dl_is_serum_test_name"
                :value="formData[0].dl_is_serum_test_name"
                placeholder="点击选择"
                @click="pickerChange('dl_is_serum_test', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查是否血清检测' }]"
              >
                <template #label>
                  <div class="field-title">是否血清检测</div>
                </template>
              </van-field> -->
              <van-field
                name="is_in_dl"
                required
                :rules="[{ required: true, message: '请检查目前是否在大连' }]"
              >
                <template #label>
                  <div class="field-title">目前是否在大连</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].is_in_dl"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >是</van-radio
                    >
                    <van-radio name="0" :disabled="route.showType == 'detail'"
                      >否</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].is_in_dl == '1'"
                name="dl_is_go_out"
                required
                :rules="[{ required: true, message: '请检查14日内是否外出' }]"
              >
                <template #label>
                  <div class="field-title">14日内是否外出</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].dl_is_go_out"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >是</van-radio
                    >
                    <van-radio name="0" :disabled="route.showType == 'detail'"
                      >否</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' && formData[0].is_in_dl == '1'
                "
                name="dl_go_out_place"
                required
                :rules="[{ required: true, message: '请检查外出地点' }]"
              >
                <template #label>
                  <div class="field-title">外出地点</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].dl_go_out_place"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >国内</van-radio
                    >
                    <van-radio name="2" :disabled="route.showType == 'detail'"
                      >境外</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' && formData[0].is_in_dl == '1'
                "
                v-model="formData[0].dl_important_address"
                rows="3"
                autosize
                type="textarea"
                maxlength="255"
                :rules="[{ required: true, message: '请检查所到重点场所' }]"
                name="temperature"
                placeholder="请输入所到重点场所及时间"
              >
                <template #label>
                  <div class="field-title">所到重点场所及时间</div>
                </template>
              </van-field>
              <!-- <van-field v-if="
                formData[0].dl_is_go_out == '1' &&
                formData[0].is_in_dl == '1'
              " readonly clickable is-link v-model="formData[0].dl_important_address_time" required :rules="[
                { required: true, message: '请检查到重点场所时间' },
              ]" name="dl_important_address_time" placeholder="点击选择" @click="
                pickerChange(
                  'dl_important_address_time',
                  'formData[0]',
                  residentIndex
                )
              ">
                <template #label>
                  <div class="field-title">到重点场所时间</div>
                </template>
              </van-field> -->
              <div
                v-if="
                  formData[0].dl_is_go_out == '1' &&
                  formData[0].is_in_dl == '1' &&
                  formData[0].dl_go_out_place == '1'
                "
                v-for="(addressItem, addressIndex) in formData[0]
                  .dl_domestic_specific_placeArr"
                :key="addressIndex"
              >
                <van-field
                  readonly
                  :is-link="addressIndex == 0"
                  :value="addressItem.label"
                  required
                  :rules="[
                    {
                      required: true,
                      message: '请检查国内具体地点',
                    },
                  ]"
                  :name="addressItem.label"
                  placeholder="点击选择"
                  @click="
                    pickerChange(
                      'dl_domestic_specific_placeArr',
                      'formData',
                      0,
                      addressIndex
                    )
                  "
                >
                  <template #label>
                    <div class="field-title">国内具体地点</div>
                  </template>
                  <template #button v-if="addressIndex != 0">
                    <van-button
                      class="address-delbtn"
                      block
                      plain
                      native-type="button"
                      size="mini"
                      type="danger"
                      text="删除地点"
                      @click.stop="
                        addressDel(
                          'dl_domestic_specific_placeArr',
                          'formData',
                          0,
                          addressIndex
                        )
                      "
                    />
                  </template>
                </van-field>
              </div>
              <div
                v-if="
                  formData[0].dl_is_go_out == '1' &&
                  formData[0].is_in_dl == '1' &&
                  formData[0].dl_go_out_place == '1'
                "
                class="address-card"
              >
                <van-button
                  class="address-addbtn"
                  block
                  plain
                  native-type="button"
                  size="small"
                  text="添加地点"
                  type="primary"
                  @click="
                    addressAdd('dl_domestic_specific_placeArr', 'formData', 0)
                  "
                />
              </div>
              <div
                v-for="(addressItem, addressIndex) in formData[0]
                  .dl_abroad_specific_placeArr"
                v-if="
                  formData[0].dl_is_go_out == '1' &&
                  formData[0].is_in_dl == '1' &&
                  formData[0].dl_go_out_place == '2'
                "
                :key="addressIndex"
              >
                <van-field
                  readonly
                  :is-link="addressIndex == 0"
                  :value="addressItem.label"
                  required
                  :rules="[
                    {
                      required: true,
                      message: '请检查国外具体地点',
                    },
                  ]"
                  @click="
                    pickerChange(
                      'dl_abroad_specific_placeArr',
                      'formData',
                      0,
                      addressIndex
                    )
                  "
                  :name="addressItem.label"
                  placeholder="点击选择"
                >
                  <template #label>
                    <div class="field-title">国外具体地点</div>
                  </template>
                  <template #button v-if="addressIndex != 0">
                    <van-button
                      class="address-delbtn"
                      block
                      plain
                      native-type="button"
                      size="mini"
                      type="danger"
                      text="删除地点"
                      @click.stop="
                        addressDel(
                          'dl_abroad_specific_placeArr',
                          'formData',
                          0,
                          addressIndex
                        )
                      "
                    />
                  </template>
                </van-field>
              </div>
              <div
                class="address-card"
                v-if="
                  formData[0].dl_is_go_out == '1' &&
                  formData[0].is_in_dl == '1' &&
                  formData[0].dl_go_out_place == '2'
                "
              >
                <van-button
                  class="address-addbtn"
                  block
                  plain
                  native-type="button"
                  size="small"
                  text="添加地点"
                  type="primary"
                  @click="
                    addressAdd('dl_abroad_specific_placeArr', 'formData', 0)
                  "
                />
              </div>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' && formData[0].is_in_dl == '1'
                "
                readonly
                clickable
                is-link
                v-model="formData[0].dl_estimate_leave_time"
                required
                :rules="[{ required: true, message: '请检查最近离连时间' }]"
                name="dl_estimate_leave_time"
                placeholder="点击选择"
                @click="pickerChange('dl_estimate_leave_time', 'formData', 0)"
              >
                <template #label>
                  <div class="field-title">最近离连时间</div>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' && formData[0].is_in_dl == '1'
                "
                :readonly="route.showType == 'detail'"
                v-model="formData[0].dl_leave_reason"
                rows="3"
                autosize
                type="textarea"
                maxlength="255"
                placeholder="请输入外出事由"
                required
                :rules="[{ required: true, message: '请检查外出事由' }]"
              >
                <template #label>
                  <div class="field-title">外出事由</div>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' && formData[0].is_in_dl == '1'
                "
                name="dl_is_school_filling"
                required
                :rules="[{ required: true, message: '请检查是否向学校报备' }]"
              >
                <template #label>
                  <div class="field-title">是否向学校报备</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].dl_is_school_filling"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >是</van-radio
                    >
                    <van-radio name="0" :disabled="route.showType == 'detail'"
                      >否</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' && formData[0].is_in_dl == '1'
                "
                name="dl_flq_is_community_filling"
                required
                :rules="[{ required: true, message: '请检查是否向社区报备' }]"
              >
                <template #label>
                  <div class="field-title">是否向社区报备</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].dl_flq_is_community_filling"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >是</van-radio
                    >
                    <van-radio name="0" :disabled="route.showType == 'detail'"
                      >否</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' && formData[0].is_in_dl == '1'
                "
                readonly
                clickable
                is-link
                v-model="formData[0].dl_lately_return_time"
                required
                :rules="[{ required: true, message: '请检查最近返连时间' }]"
                name="dl_lately_return_time"
                placeholder="点击选择"
                @click="pickerChange('dl_lately_return_time', 'formData', 0)"
              >
                <template #label>
                  <div class="field-title">最近返连时间</div>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' && formData[0].is_in_dl == '1'
                "
                readonly
                clickable
                is-link
                name="dl_return_traffic_mode_name"
                :value="formData[0].dl_return_traffic_mode_name"
                placeholder="点击选择"
                @click="pickerChange('dl_return_traffic_mode', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查返连交通方式' }]"
              >
                <template #label>
                  <div class="field-title">返连交通方式</div>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].dl_is_go_out == '1' &&
                  formData[0].is_in_dl == '1' &&
                  formData[0].dl_return_traffic_mode != '5' &&
                  formData[0].dl_return_traffic_mode != '6'
                "
                :readonly="route.showType == 'detail'"
                v-model="formData[0].dl_return_shift"
                required
                :rules="[
                  {
                    required: true,
                    message: '请检查返连班次',
                  },
                ]"
                name="dl_return_shift"
                placeholder="请输入返连班次"
              >
                <template #label>
                  <div class="field-title">返连班次</div>
                </template>
              </van-field>
              <van-field
                v-model="formData[0].temperature"
                :readonly="route.showType == 'detail'"
                type="number"
                required
                maxlength="4"
                :rules="[
                  {
                    required: true,
                    validator: tempValidator,
                    message: '请检查体温',
                  },
                ]"
                name="temperature"
                placeholder="请输入体温"
              >
                <template #label>
                  <div class="field-title">体温</div>
                </template>
              </van-field>
            </div>
          </div>

          <div class="card noInDl mt20" v-if="formData[0].is_in_dl == '0'">
            <div class="card-bar">
              <div class="card-bar-title">所在位置</div>
            </div>
            <div class="card-container">
              <van-field
                name="out_of_place"
                required
                :rules="[{ required: true, message: '请检查在外地点' }]"
              >
                <template #label>
                  <div class="field-title">在外地点</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].out_of_place"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >国内</van-radio
                    >
                    <van-radio name="2" :disabled="route.showType == 'detail'"
                      >境外</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <div
                v-if="formData[0].out_of_place == '1'"
                v-for="(addressItem, addressIndex) in formData[0]
                  .domestic_specific_placeArr"
                :key="addressIndex"
              >
                <van-field
                  readonly
                  :is-link="addressIndex == 0"
                  :value="addressItem.label"
                  required
                  :rules="[
                    {
                      required: true,
                      message: '请检查国内具体地点',
                    },
                  ]"
                  :name="addressItem.label"
                  placeholder="点击选择"
                  @click="
                    pickerChange(
                      'domestic_specific_placeArr',
                      'formData',
                      0,
                      addressIndex
                    )
                  "
                >
                  <template #label>
                    <div class="field-title">国内具体地点</div>
                  </template>
                  <template #button v-if="addressIndex != 0">
                    <van-button
                      class="address-delbtn"
                      block
                      plain
                      native-type="button"
                      size="mini"
                      type="danger"
                      text="删除地点"
                      @click.stop="
                        addressDel(
                          'domestic_specific_placeArr',
                          'formData',
                          0,
                          addressIndex
                        )
                      "
                    />
                  </template>
                </van-field>
              </div>
              <div v-if="formData[0].out_of_place == '1'" class="address-card">
                <van-button
                  class="address-addbtn"
                  block
                  plain
                  native-type="button"
                  size="small"
                  text="添加地点"
                  type="primary"
                  @click="
                    addressAdd('domestic_specific_placeArr', 'formData', 0)
                  "
                />
              </div>
              <div
                v-for="(addressItem, addressIndex) in formData[0]
                  .abroad_specific_placeArr"
                v-if="formData[0].out_of_place == '2'"
                :key="addressIndex"
              >
                <van-field
                  readonly
                  :is-link="addressIndex == 0"
                  :value="addressItem.label"
                  required
                  :rules="[
                    {
                      required: true,
                      message: '请检查国外具体地点',
                    },
                  ]"
                  @click="
                    pickerChange(
                      'abroad_specific_placeArr',
                      'formData',
                      0,
                      addressIndex
                    )
                  "
                  :name="addressItem.label"
                  placeholder="点击选择"
                >
                  <template #label>
                    <div class="field-title">国外具体地点</div>
                  </template>
                  <template #button v-if="addressIndex != 0">
                    <van-button
                      class="address-delbtn"
                      block
                      plain
                      native-type="button"
                      size="mini"
                      type="danger"
                      text="删除地点"
                      @click.stop="
                        addressDel(
                          'abroad_specific_placeArr',
                          'formData',
                          0,
                          addressIndex
                        )
                      "
                    />
                  </template>
                </van-field>
              </div>
              <div class="address-card" v-if="formData[0].out_of_place == '2'">
                <van-button
                  class="address-addbtn"
                  block
                  plain
                  native-type="button"
                  size="small"
                  text="添加地点"
                  type="primary"
                  @click="addressAdd('abroad_specific_placeArr', 'formData', 0)"
                />
              </div>
              <van-field
                readonly
                clickable
                is-link
                v-model="formData[0].estimate_leave_time"
                required
                :rules="[{ required: true, message: '请检查离连时间' }]"
                name="estimate_leave_time"
                placeholder="点击选择"
                @click="pickerChange('estimate_leave_time', 'formData', 0)"
              >
                <template #label>
                  <div class="field-title">离连时间</div>
                </template>
              </van-field>
              <van-field
                :readonly="route.showType == 'detail'"
                v-model="formData[0].leave_reason"
                rows="3"
                autosize
                type="textarea"
                maxlength="255"
                placeholder="请输入外出事由"
                required
                :rules="[{ required: true, message: '请检查外出事由' }]"
              >
                <template #label>
                  <div class="field-title">外出事由</div>
                </template>
              </van-field>
              <van-field
                name="is_school_filling"
                required
                :rules="[{ required: true, message: '请检查是否向学校报备' }]"
              >
                <template #label>
                  <div class="field-title">是否向学校报备</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].is_school_filling"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >是</van-radio
                    >
                    <van-radio name="0" :disabled="route.showType == 'detail'"
                      >否</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                readonly
                clickable
                is-link
                v-model="formData[0].estimate_return_time"
                required
                :rules="[{ required: true, message: '请检查预计返连时间' }]"
                name="estimate_return_time"
                placeholder="点击选择"
                @click="pickerChange('estimate_return_time', 'formData', 0)"
              >
                <template #label>
                  <div class="field-title">预计返连时间</div>
                </template>
              </van-field>
              <van-field
                readonly
                clickable
                is-link
                name="return_traffic_mode_name"
                :value="formData[0].return_traffic_mode_name"
                placeholder="点击选择"
                @click="pickerChange('return_traffic_mode', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查返连交通方式' }]"
              >
                <template #label>
                  <div class="field-title">返连交通方式</div>
                </template>
              </van-field>
              <van-field
                v-if="
                  formData[0].return_traffic_mode != '5' &&
                  formData[0].return_traffic_mode != '6'
                "
                v-model="formData[0].return_shift"
                :readonly="route.showType == 'detail'"
                required
                :rules="[
                  {
                    required: true,
                    message: '请检查返连班次',
                  },
                ]"
                name="return_shift"
                placeholder="请输入返连班次"
              >
                <template #label>
                  <div class="field-title">返连班次</div>
                </template>
              </van-field>
            </div>
          </div>

          <div
            class="card noInDl mt20"
            v-if="
              formData[0].dl_is_go_out == '0' && formData[0].is_in_dl == '1'
            "
          >
            <div class="card-bar">
              <div class="card-bar-title">其他</div>
            </div>
            <div class="card-container">
              <!-- <van-field
                readonly
                clickable
                is-link
                name="mask_reserve_name"
                :value="formData[0].mask_reserve_name"
                placeholder="点击选择"
                @click="pickerChange('mask_reserve', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查口罩储备情况' }]"
              >
                <template #label>
                  <div class="field-title">口罩储备情况</div>
                </template>
              </van-field> -->
              <van-field
                name="is_oneself_fill_in"
                required
                :rules="[{ required: true, message: '请检查是否本人填写' }]"
              >
                <template #label>
                  <div class="field-title">是否本人填写</div>
                </template>
                <template #input>
                  <van-radio-group
                    v-model="formData[0].is_oneself_fill_in"
                    checked-color="#D58913"
                    direction="horizontal"
                  >
                    <van-radio name="1" :disabled="route.showType == 'detail'"
                      >是</van-radio
                    >
                    <van-radio name="0" :disabled="route.showType == 'detail'"
                      >否</van-radio
                    >
                  </van-radio-group>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].is_oneself_fill_in == '0'"
                :readonly="route.showType == 'detail'"
                v-model="formData[0].filled_by_name"
                required
                :rules="[
                  {
                    required: true,
                    message: '请检查填报人姓名',
                  },
                ]"
                name="filled_by_name"
                placeholder="请输入填报人姓名"
              >
                <template #label>
                  <div class="field-title">填报人姓名</div>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].is_oneself_fill_in == '0'"
                :readonly="route.showType == 'detail'"
                v-model="formData[0].filled_by_tel"
                required
                maxlength="11"
                type="mobile"
                :rules="[
                  {
                    required: true,
                    message: '请检查填报人联系电话',
                  },
                ]"
                name="filled_by_tel"
                placeholder="请输入填报人联系电话"
              >
                <template #label>
                  <div class="field-title">填报人联系电话</div>
                </template>
              </van-field>
              <van-field
                v-if="formData[0].is_oneself_fill_in == '0'"
                readonly
                clickable
                is-link
                name="filled_by_relationship_name"
                :value="formData[0].filled_by_relationship_name"
                placeholder="点击选择"
                @click="pickerChange('filled_by_relationship', 'formData', 0)"
                required
                :rules="[{ required: true, message: '请检查与学生关系' }]"
              >
                <template #label>
                  <div class="field-title">与学生关系</div>
                </template>
              </van-field>
            </div>
          </div>

          <div class="card file mt20">
            <div class="card-bar">
              <div class="card-bar-title">上传附件</div>
            </div>
            <div class="card-container">
              <van-field name="nucleic_test_image">
                <template #label>
                  <div class="field-title">核酸检测报告</div>
                </template>
                <template #input>
                  <Uploader
                    v-model="formData[0].nucleic_test_image"
                    :max-count="1"
                    :disabled="route.showType == 'detail'"
                    file-dir="dlSchool/health/hsbg"
                  ></Uploader>
                </template>
              </van-field>
              <van-field
                name="health_code_image"
                v-if="formData[0].is_healthy == '1'"
              >
                <template #label>
                  <div class="field-title">健康码</div>
                </template>
                <template #input>
                  <Uploader
                    v-model="formData[0].health_code_image"
                    :max-count="1"
                    :disabled="route.showType == 'detail'"
                    file-dir="dlSchool/health/jkm"
                  ></Uploader>
                </template>
              </van-field>
              <van-field name="trip_code_image">
                <template #label>
                  <div class="field-title">行程码</div>
                </template>
                <template #input>
                  <Uploader
                    v-model="formData[0].trip_code_image"
                    :max-count="1"
                    :disabled="route.showType == 'detail'"
                    file-dir="dlSchool/health/xcm"
                  ></Uploader>
                </template>
              </van-field>
            </div>
          </div>

          <van-divider :style="{ borderColor: 'black' }" />

          <div class="card-container">
            <div class="card-gtjzz mid">
              <div class="card-gtjzz-title">
                备选共同居住人<br />
                <span style="font-size: 13px"
                  >(请点选或添加今日共同居住人)</span
                >
              </div>
              <div>
                <van-button
                  v-if="route.showType != 'detail'"
                  class="card-gtjzz-btn"
                  size="small"
                  color="#D58913"
                  native-type="button"
                  style="width: 80px"
                  plain
                  @click="pickerChange('gtjzz')"
                  >添加</van-button
                >
              </div>
            </div>
            <div class="residentlist">
              <div
                class="w100"
                v-for="(residentItem, residentIndex) in residentList"
                :key="residentItem.id"
              >
                <van-row
                  type="flex"
                  justify="space-between"
                  class="residentlist-item"
                  :class="{
                    'residentlist-item-active': residentItem.isChecked,
                  }"
                >
                  <van-col span="22" offset="1" class="">
                    <van-row type="flex" justify="start" class="w100">
                      <van-col span="24" class="mid bold">
                        {{ residentItem.name }}
                        <div class="tag">
                          {{ residentItem.relationship_name }}
                        </div>
                      </van-col>
                    </van-row>
                    <div class="desc">{{ residentItem.card_no_tmd }}</div>
                    <div
                      class="residentlist-item-bottom"
                      v-if="route.showType != 'detail'"
                    >
                      <van-button
                        class="residentlist-item-bottom-btn"
                        size="small"
                        :color="residentItem.isChecked ? '#A3A3A3' : '#D58913'"
                        type="info"
                        native-type="button"
                        :text="residentItem.isChecked ? '取消选中' : '选中'"
                        @click="checkAction(residentItem)"
                      />
                      <van-button
                        class="residentlist-item-bottom-btn"
                        size="small"
                        color="#D58913"
                        type="info"
                        native-type="button"
                        text="修改"
                        @click="editAction(residentItem)"
                      />
                      <!-- <van-button
                        v-if="true"
                        class="residentlist-item-bottom-btn"
                        size="small"
                        color="#D58913"
                        type="info"
                        native-type="button"
                        text="删除"
                        @click="deleAction(residentItem)"
                      /> -->
                    </div>
                  </van-col>
                </van-row>
                <van-collapse
                  v-model="activeNames"
                  v-if="residentItem.isChecked"
                  @change="collapseChange"
                >
                  <van-collapse-item
                    :name="residentItem.id"
                    :lazy-render="false"
                    class="coll_flex"
                  >
                    <div class="card base">
                      <div class="card-bar">
                        <div class="card-bar-title">基础信息</div>
                      </div>
                      <div class="card-container">
                        <van-field
                          v-model="residentItem.form.name"
                          clearable
                          maxlength="20"
                          readonly
                          :rules="[{ required: true, message: '请检查姓名' }]"
                          name="name"
                          input-align="right"
                          placeholder="请输入姓名"
                        >
                          <template #label>
                            <div class="field-title">姓名</div>
                          </template>
                        </van-field>
                        <van-field
                          v-model="residentItem.form.mobile"
                          clearable
                          maxlength="11"
                          readonly
                          :rules="[
                            { required: true, message: '请检查联系方式' },
                          ]"
                          name="mobile"
                          type="mobile"
                          input-align="right"
                          placeholder="请输入联系方式"
                          v-if="route.showType !== 'detail'"
                        >
                          <template #label>
                            <div class="field-title">联系方式</div>
                          </template>
                        </van-field>
                        <van-field
                          v-model="residentItem.form.card_no_tmd"
                          clearable
                          maxlength="18"
                          readonly
                          :rules="[
                            { required: true, message: '请检查身份证号' },
                          ]"
                          name="card_no_tmd"
                          input-align="right"
                          placeholder="请输入身份证号"
                        >
                          <template #label>
                            <div class="field-title">身份证号</div>
                          </template>
                        </van-field>
                        <van-field
                          v-model="residentItem.form.hsjcsj || '无'"
                          readonly
                          name="hsjcsj"
                          @click="
                            pickerChange(
                              'hsjcsj',
                              'residentForm',
                              residentIndex
                            )
                          "
                          input-align="right"
                        >
                          <template #label>
                            <div class="field-title">核酸检测时间</div>
                          </template>
                        </van-field>
                        <van-field
                          v-model="residentItem.form.ym_time || '无'"
                          readonly
                          name="ym_time"
                          input-align="right"
                        >
                          <template #label>
                            <div class="field-title">疫苗接种情况</div>
                          </template>
                        </van-field>
                      </div>
                    </div>

                    <div class="card condition mt20">
                      <div class="card-bar">
                        <div class="card-bar-title">健康状况申报</div>
                      </div>
                      <div class="card-container">
                        <van-field
                          name="is_healthy"
                          required
                          :rules="[
                            { required: true, message: '请检查是否健康' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">是否健康</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="residentItem.form.is_healthy"
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-radio
                                name="1"
                                :disabled="route.showType == 'detail'"
                                >是</van-radio
                              >
                              <van-radio
                                name="0"
                                :disabled="route.showType == 'detail'"
                                >否</van-radio
                              >
                            </van-radio-group>
                          </template>
                        </van-field>
                        <van-field
                          v-if="residentItem.form.is_healthy == '0'"
                          name="thirty_days_symptomArr"
                          required
                          :rules="[
                            {
                              required: true,
                              message: '请检查十大症状',
                            },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">十大症状</div>
                          </template>
                          <template #input>
                            <van-checkbox-group
                              v-model="residentItem.form.thirty_days_symptomArr"
                              direction="horizontal"
                            >
                              <van-row>
                                <van-col
                                  span="12"
                                  v-for="discomfortItem in dict.discomfortArr"
                                  :key="discomfortItem.value"
                                >
                                  <van-checkbox
                                    checked-color="#D58913"
                                    :disabled="route.showType == 'detail'"
                                    :name="discomfortItem.value"
                                    shape="square"
                                    >{{ discomfortItem.text }}</van-checkbox
                                  >
                                </van-col>
                                <van-col span="24">
                                  <van-checkbox
                                    checked-color="#D58913"
                                    name="嗅（味）觉减退（丧失）"
                                    :disabled="route.showType == 'detail'"
                                    shape="square"
                                    >嗅（味）觉减退（丧失）</van-checkbox
                                  >
                                </van-col>
                              </van-row>
                            </van-checkbox-group>
                          </template>
                        </van-field>
                        <van-field
                          readonly
                          clickable
                          is-link
                          name="healthy_code_colour_name"
                          :value="residentItem.form.healthy_code_colour_name"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'healthy_code_colour',
                              'residentForm',
                              residentIndex
                            )
                          "
                          required
                          :rules="[
                            { required: true, message: '请检查健康码颜色' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">健康码颜色</div>
                          </template>
                        </van-field>
                        <van-field
                          name="contact_situationArr"
                          required
                          :rules="[
                            { required: true, message: '请检查7天内接触人员' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">7天内接触人员</div>
                            <div class="field-text">
                              (7天内接触人员选择为
                              ‘新冠肺炎确诊病例或无症状感染者’ 或
                              ‘新冠肺炎疑似感染者’ 时请选择密接类型)
                            </div>
                          </template>
                          <template #input>
                            <van-checkbox-group
                              v-model="residentItem.form.contact_situationArr"
                              @change="
                                contactSituationChange(
                                  $event,
                                  'residentForm',
                                  residentIndex
                                )
                              "
                              direction="horizontal"
                            >
                              <van-row>
                                <van-col span="12">
                                  <van-checkbox
                                    :disabled="
                                      (!residentItem.form.discomforwjc &&
                                        residentItem.form.contact_situationArr
                                          .length > 0) ||
                                      route.showType == 'detail'
                                    "
                                    checked-color="#D58913"
                                    name="无接触"
                                    shape="square"
                                    >无接触</van-checkbox
                                  >
                                </van-col>
                                <van-col span="12">
                                  <van-checkbox
                                    :disabled="
                                      (!residentItem.form.discomforbqc &&
                                        residentItem.form.contact_situationArr
                                          .length > 0) ||
                                      route.showType == 'detail'
                                    "
                                    checked-color="#D58913"
                                    name="不清楚"
                                    shape="square"
                                    >不清楚</van-checkbox
                                  >
                                </van-col>
                                <van-col span="12">
                                  <van-checkbox
                                    :disabled="
                                      ((residentItem.form.discomforwjc ||
                                        residentItem.form.discomforbqc) &&
                                        residentItem.form.contact_situationArr
                                          .length > 0) ||
                                      route.showType == 'detail'
                                    "
                                    checked-color="#D58913"
                                    name="境外人员"
                                    shape="square"
                                    >境外人员</van-checkbox
                                  >
                                </van-col>
                                <van-col span="24">
                                  <van-checkbox
                                    :disabled="
                                      ((residentItem.form.discomforwjc ||
                                        residentItem.form.discomforbqc) &&
                                        residentItem.form.contact_situationArr
                                          .length > 0) ||
                                      route.showType == 'detail'
                                    "
                                    checked-color="#D58913"
                                    name="重点地区人员"
                                    shape="square"
                                    >重点地区人员</van-checkbox
                                  >
                                </van-col>
                                <van-col span="24">
                                  <van-checkbox
                                    :disabled="
                                      ((residentItem.form.discomforwjc ||
                                        residentItem.form.discomforbqc) &&
                                        residentItem.form.contact_situationArr
                                          .length > 0) ||
                                      route.showType == 'detail'
                                    "
                                    checked-color="#D58913"
                                    name="被医学隔离观察人员"
                                    shape="square"
                                    >被医学隔离观察人员</van-checkbox
                                  >
                                </van-col>
                                <van-col span="24">
                                  <van-checkbox
                                    :disabled="
                                      ((residentItem.form.discomforwjc ||
                                        residentItem.form.discomforbqc) &&
                                        residentItem.form.contact_situationArr
                                          .length > 0) ||
                                      route.showType == 'detail'
                                    "
                                    checked-color="#D58913"
                                    name="发热或有呼吸道症状的患者"
                                    shape="square"
                                    >发热或有呼吸道症状的患者
                                  </van-checkbox>
                                </van-col>
                                <van-col span="24">
                                  <van-checkbox
                                    :disabled="
                                      ((residentItem.form.discomforwjc ||
                                        residentItem.form.discomforbqc) &&
                                        residentItem.form.contact_situationArr
                                          .length > 0) ||
                                      route.showType == 'detail'
                                    "
                                    checked-color="#D58913"
                                    name="新冠肺炎确诊病例或无症状感染者"
                                    shape="square"
                                    >新冠肺炎确诊病例或无症状感染者
                                  </van-checkbox>
                                </van-col>
                                <van-col span="24">
                                  <van-checkbox
                                    :disabled="
                                      ((residentItem.form.discomforwjc ||
                                        residentItem.form.discomforbqc) &&
                                        residentItem.form.contact_situationArr
                                          .length > 0) ||
                                      route.showType == 'detail'
                                    "
                                    checked-color="#D58913"
                                    name="新冠肺炎疑似感染者"
                                    shape="square"
                                    >新冠肺炎疑似感染者</van-checkbox
                                  >
                                </van-col>
                                <van-col span="12">
                                  <van-checkbox
                                    :disabled="residentItem.form.close_flag"
                                    checked-color="#D58913"
                                    name="一密"
                                    shape="round"
                                    >一密</van-checkbox
                                  >
                                </van-col>
                                <van-col span="12">
                                  <van-checkbox
                                    :disabled="residentItem.form.close_flag"
                                    checked-color="#D58913"
                                    name="二密"
                                    shape="round"
                                  >
                                    二密</van-checkbox
                                  >
                                </van-col>
                              </van-row>
                            </van-checkbox-group>
                          </template>
                        </van-field>
                        <van-field
                          readonly
                          clickable
                          is-link
                          name="dl_is_has_quarantine_name"
                          :value="residentItem.form.dl_is_has_quarantine_name"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'dl_is_has_quarantine',
                              'residentForm',
                              residentIndex
                            )
                          "
                          required
                          :rules="[
                            { required: true, message: '请检查是否进行过隔离' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">是否隔离</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_has_quarantine == '1' ||
                            residentItem.form.dl_is_has_quarantine == '2'
                          "
                          name="dl_isolation_mode"
                          required
                          :rules="[
                            { required: true, message: '请检查隔离方式' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">隔离方式</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="residentItem.form.dl_isolation_mode"
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-row>
                                <van-col span="12">
                                  <van-radio
                                    name="1"
                                    :disabled="route.showType == 'detail'"
                                    >居家</van-radio
                                  >
                                </van-col>
                                <van-col span="12">
                                  <van-radio
                                    name="2"
                                    :disabled="route.showType == 'detail'"
                                    >集中</van-radio
                                  >
                                </van-col>
                                <van-col span="24" class="mt10">
                                  <van-radio
                                    name="3"
                                    :disabled="route.showType == 'detail'"
                                    >居家健康检测</van-radio
                                  >
                                </van-col>
                                <van-col span="24" class="mt10">
                                  <van-radio
                                    name="4"
                                    :disabled="route.showType == 'detail'"
                                    >校内封控</van-radio
                                  >
                                </van-col>
                              </van-row>
                            </van-radio-group>
                          </template>
                        </van-field>
                        <van-field
                          v-if="residentItem.form.dl_isolation_mode == '2'"
                          v-model="residentItem.form.dl_isolation_mode_address"
                          required
                          :rules="[
                            { required: true, message: '请检查隔离地点' },
                          ]"
                          name="temperature"
                          placeholder="请输入隔离地点"
                        >
                          <template #label>
                            <div class="field-title">隔离地点</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_has_quarantine == '1' ||
                            residentItem.form.dl_is_has_quarantine == '2'
                          "
                          readonly
                          clickable
                          is-link
                          v-model="residentItem.form.dl_isolation_start_time"
                          required
                          :rules="[
                            { required: true, message: '请检查隔离开始时间' },
                          ]"
                          name="dl_isolation_start_time"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'dl_isolation_start_time',
                              'residentForm',
                              residentIndex
                            )
                          "
                        >
                          <template #label>
                            <div class="field-title">隔离开始时间</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_has_quarantine == '1' ||
                            residentItem.form.dl_is_has_quarantine == '2'
                          "
                          readonly
                          clickable
                          is-link
                          v-model="residentItem.form.dl_isolation_end_time"
                          required
                          :rules="[
                            { required: true, message: '请检查隔离结束时间' },
                          ]"
                          name="dl_isolation_end_time"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'dl_isolation_end_time',
                              'residentForm',
                              residentIndex
                            )
                          "
                        >
                          <template #label>
                            <div class="field-title">隔离结束时间</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="residentItem.form.dl_is_has_quarantine == '3'"
                          readonly
                          clickable
                          is-link
                          name="dl_is_nucleic_acid_test_name"
                          :value="
                            residentItem.form.dl_is_nucleic_acid_test_name
                          "
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'dl_is_nucleic_acid_test',
                              'residentForm',
                              residentIndex
                            )
                          "
                          required
                          :rules="[
                            { required: true, message: '请检查是否核酸检测' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">是否核酸检测</div>
                          </template>
                        </van-field>
                        <!-- <van-field
                          v-if="residentItem.form.dl_is_has_quarantine == '3'"
                          readonly
                          clickable
                          is-link
                          name="dl_is_serum_test_name"
                          :value="residentItem.form.dl_is_serum_test_name"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'dl_is_serum_test',
                              'residentForm',
                              residentIndex
                            )
                          "
                          required
                          :rules="[
                            { required: true, message: '请检查是否血清检测' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">是否血清检测</div>
                          </template>
                        </van-field> -->
                        <van-field
                          name="is_in_dl"
                          required
                          :rules="[
                            { required: true, message: '请检查目前是否在大连' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">目前是否在大连</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="residentItem.form.is_in_dl"
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-radio
                                name="1"
                                :disabled="route.showType == 'detail'"
                                >是</van-radio
                              >
                              <van-radio
                                name="0"
                                :disabled="route.showType == 'detail'"
                                >否</van-radio
                              >
                            </van-radio-group>
                          </template>
                        </van-field>
                        <van-field
                          v-if="residentItem.form.is_in_dl == '1'"
                          name="dl_is_go_out"
                          required
                          :rules="[
                            { required: true, message: '请检查14日内是否外出' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">14日内是否外出</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="residentItem.form.dl_is_go_out"
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-radio
                                name="1"
                                :disabled="route.showType == 'detail'"
                                >是</van-radio
                              >
                              <van-radio
                                name="0"
                                :disabled="route.showType == 'detail'"
                                >否</van-radio
                              >
                            </van-radio-group>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1'
                          "
                          name="dl_go_out_place"
                          required
                          :rules="[
                            { required: true, message: '请检查外出地点' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">外出地点</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="residentItem.form.dl_go_out_place"
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-radio
                                name="1"
                                :disabled="route.showType == 'detail'"
                                >国内</van-radio
                              >
                              <van-radio
                                name="2"
                                :disabled="route.showType == 'detail'"
                                >境外</van-radio
                              >
                            </van-radio-group>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1'
                          "
                          v-model="residentItem.form.dl_important_address"
                          rows="3"
                          autosize
                          type="textarea"
                          maxlength="255"
                          :rules="[
                            {
                              required: true,
                              message: '请检查所到重点场所及时间',
                            },
                          ]"
                          name="temperature"
                          placeholder="请输入隔离地点"
                        >
                          <template #label>
                            <div class="field-title">所到重点场所及时间</div>
                          </template>
                        </van-field>
                        <!-- <van-field v-if="
                          residentItem.form.dl_is_go_out == '1' &&
                          residentItem.form.is_in_dl == '1'
                        " readonly clickable is-link v-model="residentItem.form.dl_important_address_time" required
                          :rules="[
                            { required: true, message: '请检查到重点场所时间' },
                          ]" name="dl_important_address_time" placeholder="点击选择" @click="
                            pickerChange(
                              'dl_important_address_time',
                              'residentForm',
                              residentIndex
                            )
                          ">
                          <template #label>
                            <div class="field-title">到重点场所时间</div>
                          </template>
                        </van-field> -->
                        <div
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1' &&
                            residentItem.form.dl_go_out_place == '1'
                          "
                          v-for="(addressItem, addressIndex) in residentItem
                            .form.dl_domestic_specific_placeArr"
                          :key="addressIndex"
                        >
                          <van-field
                            readonly
                            :is-link="addressIndex == 0"
                            :value="addressItem.label"
                            required
                            :rules="[
                              {
                                required: true,
                                message: '请检查国内具体地点',
                              },
                            ]"
                            :name="addressItem.label"
                            placeholder="点击选择"
                            @click="
                              pickerChange(
                                'dl_domestic_specific_placeArr',
                                'residentForm',
                                residentIndex,
                                addressIndex
                              )
                            "
                          >
                            <template #label>
                              <div class="field-title">国内具体地点</div>
                            </template>
                            <template #button v-if="addressIndex != 0">
                              <van-button
                                class="address-delbtn"
                                block
                                plain
                                native-type="button"
                                size="mini"
                                type="danger"
                                text="删除地点"
                                @click.stop="
                                  addressDel(
                                    'dl_domestic_specific_placeArr',
                                    'residentForm',
                                    residentIndex,
                                    addressIndex
                                  )
                                "
                              />
                            </template>
                          </van-field>
                        </div>
                        <div
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1' &&
                            residentItem.form.dl_go_out_place == '1'
                          "
                          class="address-card"
                        >
                          <van-button
                            class="address-addbtn"
                            block
                            plain
                            native-type="button"
                            size="small"
                            text="添加地点"
                            type="primary"
                            @click="
                              addressAdd(
                                'dl_domestic_specific_placeArr',
                                'residentForm',
                                residentIndex
                              )
                            "
                          />
                        </div>
                        <div
                          v-for="(addressItem, addressIndex) in residentItem
                            .form.dl_abroad_specific_placeArr"
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1' &&
                            residentItem.form.dl_go_out_place == '2'
                          "
                          :key="addressIndex"
                        >
                          <van-field
                            readonly
                            :is-link="addressIndex == 0"
                            :value="addressItem.label"
                            required
                            :rules="[
                              {
                                required: true,
                                message: '请检查国外具体地点',
                              },
                            ]"
                            @click="
                              pickerChange(
                                'dl_abroad_specific_placeArr',
                                'residentForm',
                                residentIndex,
                                addressIndex
                              )
                            "
                            :name="addressItem.label"
                            placeholder="点击选择"
                          >
                            <template #label>
                              <div class="field-title">国外具体地点</div>
                            </template>
                            <template #button v-if="addressIndex != 0">
                              <van-button
                                class="address-delbtn"
                                block
                                plain
                                native-type="button"
                                size="mini"
                                type="danger"
                                text="删除地点"
                                @click.stop="
                                  addressDel(
                                    'dl_abroad_specific_placeArr',
                                    'residentForm',
                                    residentIndex,
                                    addressIndex
                                  )
                                "
                              />
                            </template>
                          </van-field>
                        </div>
                        <div
                          class="address-card"
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1' &&
                            residentItem.form.dl_go_out_place == '2'
                          "
                        >
                          <van-button
                            class="address-addbtn"
                            block
                            plain
                            native-type="button"
                            size="small"
                            text="添加地点"
                            type="primary"
                            @click="
                              addressAdd(
                                'dl_abroad_specific_placeArr',
                                'residentForm',
                                residentIndex
                              )
                            "
                          />
                        </div>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1'
                          "
                          readonly
                          clickable
                          is-link
                          v-model="residentItem.form.dl_estimate_leave_time"
                          required
                          :rules="[
                            { required: true, message: '请检查最近离连时间' },
                          ]"
                          name="dl_estimate_leave_time"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'dl_estimate_leave_time',
                              'residentForm',
                              residentIndex
                            )
                          "
                        >
                          <template #label>
                            <div class="field-title">最近离连时间</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1'
                          "
                          :readonly="route.showType == 'detail'"
                          v-model="residentItem.form.dl_leave_reason"
                          rows="3"
                          autosize
                          type="textarea"
                          maxlength="255"
                          placeholder="请输入外出事由"
                          required
                          :rules="[
                            { required: true, message: '请检查外出事由' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">外出事由</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1'
                          "
                          name="dl_is_school_filling"
                          required
                          :rules="[
                            { required: true, message: '请检查是否向学校报备' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">是否向学校报备</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="residentItem.form.dl_is_school_filling"
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-radio
                                name="1"
                                :disabled="route.showType == 'detail'"
                                >是</van-radio
                              >
                              <van-radio
                                name="0"
                                :disabled="route.showType == 'detail'"
                                >否</van-radio
                              >
                            </van-radio-group>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1'
                          "
                          name="dl_flq_is_community_filling"
                          required
                          :rules="[
                            { required: true, message: '请检查是否向社区报备' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">是否向社区报备</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="
                                residentItem.form.dl_flq_is_community_filling
                              "
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-radio
                                name="1"
                                :disabled="route.showType == 'detail'"
                                >是</van-radio
                              >
                              <van-radio
                                name="0"
                                :disabled="route.showType == 'detail'"
                                >否</van-radio
                              >
                            </van-radio-group>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1'
                          "
                          readonly
                          clickable
                          is-link
                          v-model="residentItem.form.dl_lately_return_time"
                          required
                          :rules="[
                            { required: true, message: '请检查最近返连时间' },
                          ]"
                          name="dl_lately_return_time"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'dl_lately_return_time',
                              'residentForm',
                              residentIndex
                            )
                          "
                        >
                          <template #label>
                            <div class="field-title">最近返连时间</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1'
                          "
                          readonly
                          clickable
                          is-link
                          name="dl_return_traffic_mode_name"
                          :value="residentItem.form.dl_return_traffic_mode_name"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'dl_return_traffic_mode',
                              'residentForm',
                              residentIndex
                            )
                          "
                          required
                          :rules="[
                            { required: true, message: '请检查返连交通方式' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">返连交通方式</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.dl_is_go_out == '1' &&
                            residentItem.form.is_in_dl == '1' &&
                            residentItem.form.dl_return_traffic_mode != '5' &&
                            residentItem.form.dl_return_traffic_mode != '6'
                          "
                          :readonly="route.showType == 'detail'"
                          v-model="residentItem.form.dl_return_shift"
                          required
                          :rules="[
                            {
                              required: true,
                              message: '请检查返连班次',
                            },
                          ]"
                          name="dl_return_shift"
                          placeholder="请输入返连班次"
                        >
                          <template #label>
                            <div class="field-title">返连班次</div>
                          </template>
                        </van-field>
                        <van-field
                          v-model="residentItem.form.temperature"
                          :readonly="route.showType == 'detail'"
                          type="number"
                          required
                          maxlength="4"
                          :rules="[
                            {
                              required: true,
                              validator: tempValidator,
                              message: '请检查体温',
                            },
                          ]"
                          name="temperature"
                          placeholder="请输入体温"
                        >
                          <template #label>
                            <div class="field-title">体温</div>
                          </template>
                        </van-field>
                      </div>
                    </div>

                    <div
                      class="card noInDl mt20"
                      v-if="residentItem.form.is_in_dl == '0'"
                    >
                      <div class="card-bar">
                        <div class="card-bar-title">所在位置</div>
                      </div>
                      <div class="card-container">
                        <van-field
                          name="out_of_place"
                          required
                          :rules="[
                            { required: true, message: '请检查在外地点' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">在外地点</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="residentItem.form.out_of_place"
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-radio
                                name="1"
                                :disabled="route.showType == 'detail'"
                                >国内</van-radio
                              >
                              <van-radio
                                name="2"
                                :disabled="route.showType == 'detail'"
                                >境外</van-radio
                              >
                            </van-radio-group>
                          </template>
                        </van-field>
                        <div
                          v-if="residentItem.form.out_of_place == '1'"
                          v-for="(addressItem, addressIndex) in residentItem
                            .form.domestic_specific_placeArr"
                          :key="addressIndex"
                        >
                          <van-field
                            readonly
                            :is-link="addressIndex == 0"
                            :value="addressItem.label"
                            required
                            :rules="[
                              {
                                required: true,
                                message: '请检查国内具体地点',
                              },
                            ]"
                            :name="addressItem.label"
                            placeholder="点击选择"
                            @click="
                              pickerChange(
                                'domestic_specific_placeArr',
                                'residentForm',
                                residentIndex,
                                addressIndex
                              )
                            "
                          >
                            <template #label>
                              <div class="field-title">国内具体地点</div>
                            </template>
                            <template #button v-if="addressIndex != 0">
                              <van-button
                                class="address-delbtn"
                                block
                                plain
                                native-type="button"
                                size="mini"
                                type="danger"
                                text="删除地点"
                                @click.stop="
                                  addressDel(
                                    'domestic_specific_placeArr',
                                    'residentForm',
                                    residentIndex,
                                    addressIndex
                                  )
                                "
                              />
                            </template>
                          </van-field>
                        </div>
                        <div
                          v-if="residentItem.form.out_of_place == '1'"
                          class="address-card"
                        >
                          <van-button
                            class="address-addbtn"
                            block
                            plain
                            native-type="button"
                            size="small"
                            text="添加地点"
                            type="primary"
                            @click="
                              addressAdd(
                                'domestic_specific_placeArr',
                                'residentForm',
                                residentIndex
                              )
                            "
                          />
                        </div>
                        <div
                          v-for="(addressItem, addressIndex) in residentItem
                            .form.abroad_specific_placeArr"
                          v-if="residentItem.form.out_of_place == '2'"
                          :key="addressIndex"
                        >
                          <van-field
                            readonly
                            :is-link="addressIndex == 0"
                            :value="addressItem.label"
                            required
                            :rules="[
                              {
                                required: true,
                                message: '请检查国外具体地点',
                              },
                            ]"
                            @click="
                              pickerChange(
                                'abroad_specific_placeArr',
                                'residentForm',
                                residentIndex,
                                addressIndex
                              )
                            "
                            :name="addressItem.label"
                            placeholder="点击选择"
                          >
                            <template #label>
                              <div class="field-title">国外具体地点</div>
                            </template>
                            <template #button v-if="addressIndex != 0">
                              <van-button
                                class="address-delbtn"
                                block
                                plain
                                native-type="button"
                                size="mini"
                                type="danger"
                                text="删除地点"
                                @click.stop="
                                  addressDel(
                                    'abroad_specific_placeArr',
                                    'residentForm',
                                    residentIndex,
                                    addressIndex
                                  )
                                "
                              />
                            </template>
                          </van-field>
                        </div>
                        <div
                          class="address-card"
                          v-if="residentItem.form.out_of_place == '2'"
                        >
                          <van-button
                            class="address-addbtn"
                            block
                            plain
                            native-type="button"
                            size="small"
                            text="添加地点"
                            type="primary"
                            @click="
                              addressAdd(
                                'abroad_specific_placeArr',
                                'residentForm',
                                residentIndex
                              )
                            "
                          />
                        </div>
                        <van-field
                          readonly
                          clickable
                          is-link
                          v-model="residentItem.form.estimate_leave_time"
                          required
                          :rules="[
                            { required: true, message: '请检查离连时间' },
                          ]"
                          name="estimate_leave_time"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'estimate_leave_time',
                              'residentForm',
                              residentIndex
                            )
                          "
                        >
                          <template #label>
                            <div class="field-title">离连时间</div>
                          </template>
                        </van-field>
                        <van-field
                          :readonly="route.showType == 'detail'"
                          v-model="residentItem.form.leave_reason"
                          rows="3"
                          autosize
                          type="textarea"
                          maxlength="255"
                          placeholder="请输入外出事由"
                          required
                          :rules="[
                            { required: true, message: '请检查外出事由' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">外出事由</div>
                          </template>
                        </van-field>
                        <van-field
                          name="is_school_filling"
                          required
                          :rules="[
                            { required: true, message: '请检查是否向学校报备' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">是否向学校报备</div>
                          </template>
                          <template #input>
                            <van-radio-group
                              v-model="residentItem.form.is_school_filling"
                              checked-color="#D58913"
                              direction="horizontal"
                            >
                              <van-radio
                                name="1"
                                :disabled="route.showType == 'detail'"
                                >是</van-radio
                              >
                              <van-radio
                                name="0"
                                :disabled="route.showType == 'detail'"
                                >否</van-radio
                              >
                            </van-radio-group>
                          </template>
                        </van-field>
                        <van-field
                          readonly
                          clickable
                          is-link
                          v-model="residentItem.form.estimate_return_time"
                          required
                          :rules="[
                            { required: true, message: '请检查预计返连时间' },
                          ]"
                          name="estimate_return_time"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'estimate_return_time',
                              'residentForm',
                              residentIndex
                            )
                          "
                        >
                          <template #label>
                            <div class="field-title">预计返连时间</div>
                          </template>
                        </van-field>
                        <van-field
                          readonly
                          clickable
                          is-link
                          name="return_traffic_mode_name"
                          :value="residentItem.form.return_traffic_mode_name"
                          placeholder="点击选择"
                          @click="
                            pickerChange(
                              'return_traffic_mode',
                              'residentForm',
                              residentIndex
                            )
                          "
                          required
                          :rules="[
                            { required: true, message: '请检查返连交通方式' },
                          ]"
                        >
                          <template #label>
                            <div class="field-title">返连交通方式</div>
                          </template>
                        </van-field>
                        <van-field
                          v-if="
                            residentItem.form.return_traffic_mode != '5' &&
                            residentItem.form.return_traffic_mode != '6'
                          "
                          v-model="residentItem.form.return_shift"
                          :readonly="route.showType == 'detail'"
                          required
                          :rules="[
                            {
                              required: true,
                              message: '请检查返连班次',
                            },
                          ]"
                          name="return_shift"
                          placeholder="请输入返连班次"
                        >
                          <template #label>
                            <div class="field-title">返连班次</div>
                          </template>
                        </van-field>
                      </div>
                    </div>

                    <div class="card school mt20" v-if="fillingList.length > 0">
                      <div class="card-bar">
                        <div class="card-bar-title">动态填报信息</div>
                      </div>
                      <div class="card-container">
                        <van-field
                          v-for="fillingItem in fillingList"
                          :readonly="route.showType == 'detail'"
                          :key="fillingItem.id"
                          clearable
                          required
                          :rules="[
                            {
                              required: true,
                              message: '请检查' + fillingItem.filling_contents,
                            },
                          ]"
                          :name="fillingItem.key_num"
                          v-model="residentItem.form[fillingItem.key_num]"
                          :label="fillingItem.filling_contents"
                          :placeholder="'请输入' + fillingItem.filling_contents"
                        >
                          <template #label>
                            <div class="field-title">
                              {{ fillingItem.filling_contents }}
                            </div>
                          </template>
                        </van-field>
                      </div>
                    </div>

                    <div
                      class="card risk mt20"
                      v-if="residentItem.is_student != '1'"
                    >
                      <div class="card-bar">
                        <div class="card-bar-title">风险人群</div>
                      </div>
                      <div class="card-container">
                        <div class="card-container-item">
                          <div class="card-item-subtitle">
                            {{ dict1.risk.subtitle1 }}
                          </div>
                          <div class="card-item-label">
                            {{ dict1.risk.desc2 }}
                          </div>
                          <div class="card-item-content">
                            <van-field
                              name="is_fxrq_jkll_br"
                              :required="false"
                              :rules="[
                                { required: true, message: '请检查风险人群' },
                              ]"
                            >
                              <template #label>
                                <div class="field-title">本人</div>
                              </template>
                              <template #input>
                                <van-radio-group
                                  v-model="residentItem.form.is_fxrq_jkll_br"
                                  checked-color="#D58913"
                                  direction="horizontal"
                                >
                                  <van-radio
                                    name="1"
                                    :disabled="route.showType == 'detail'"
                                    >是</van-radio
                                  >
                                  <van-radio
                                    name="0"
                                    :disabled="route.showType == 'detail'"
                                    >否</van-radio
                                  >
                                </van-radio-group>
                              </template>
                            </van-field>
                          </div>
                        </div>
                        <div class="card-container-item">
                          <div class="card-item-label">
                            {{ dict1.risk.desc3 }}
                          </div>
                          <div class="card-item-content">
                            <van-field
                              name="is_fxrq_jzyx_br"
                              :required="false"
                              :rules="[
                                { required: true, message: '请检查风险人群' },
                              ]"
                            >
                              <template #label>
                                <div class="field-title">本人</div>
                              </template>
                              <template #input>
                                <van-radio-group
                                  v-model="residentItem.form.is_fxrq_jzyx_br"
                                  checked-color="#D58913"
                                  direction="horizontal"
                                >
                                  <van-radio
                                    name="1"
                                    :disabled="route.showType == 'detail'"
                                    >是</van-radio
                                  >
                                  <van-radio
                                    name="0"
                                    :disabled="route.showType == 'detail'"
                                    >否</van-radio
                                  >
                                </van-radio-group>
                              </template>
                            </van-field>
                          </div>
                        </div>
                        <div class="card-container-item">
                          <div class="card-item-label">
                            {{ dict1.risk.desc4 }}
                          </div>
                          <div class="card-item-content">
                            <van-field
                              name="is_fxrq_xgfy_br"
                              :required="false"
                              :rules="[
                                { required: true, message: '请检查风险人群' },
                              ]"
                            >
                              <template #label>
                                <div class="field-title">本人</div>
                              </template>
                              <template #input>
                                <van-radio-group
                                  v-model="residentItem.form.is_fxrq_xgfy_br"
                                  checked-color="#D58913"
                                  direction="horizontal"
                                >
                                  <van-radio
                                    name="1"
                                    :disabled="route.showType == 'detail'"
                                    >是</van-radio
                                  >
                                  <van-radio
                                    name="0"
                                    :disabled="route.showType == 'detail'"
                                    >否</van-radio
                                  >
                                </van-radio-group>
                              </template>
                            </van-field>
                          </div>
                        </div>
                        <div class="card-container-item">
                          <div class="card-item-label">
                            {{ dict1.risk.desc5 }}
                          </div>
                          <div class="card-item-content">
                            <van-field
                              name="is_fxrq_bj_br"
                              :required="false"
                              :rules="[
                                { required: true, message: '请检查风险人群' },
                              ]"
                            >
                              <template #label>
                                <div class="field-title">本人</div>
                              </template>
                              <template #input>
                                <van-radio-group
                                  v-model="residentItem.form.is_fxrq_bj_br"
                                  checked-color="#D58913"
                                  direction="horizontal"
                                >
                                  <van-radio
                                    name="1"
                                    :disabled="route.showType == 'detail'"
                                    >是</van-radio
                                  >
                                  <van-radio
                                    name="0"
                                    :disabled="route.showType == 'detail'"
                                    >否</van-radio
                                  >
                                </van-radio-group>
                              </template>
                            </van-field>
                          </div>
                        </div>
                        <div class="card-container-item">
                          <div class="card-item-label">
                            {{ dict1.risk.desc6 }}
                          </div>
                          <div class="card-item-content">
                            <van-field
                              name="is_fxrq_nrsq_br"
                              :required="false"
                              :rules="[
                                { required: true, message: '请检查风险人群' },
                              ]"
                            >
                              <template #label>
                                <div class="field-title">本人</div>
                              </template>
                              <template #input>
                                <van-radio-group
                                  v-model="residentItem.form.is_fxrq_nrsq_br"
                                  checked-color="#D58913"
                                  direction="horizontal"
                                >
                                  <van-radio
                                    name="1"
                                    :disabled="route.showType == 'detail'"
                                    >是</van-radio
                                  >
                                  <van-radio
                                    name="0"
                                    :disabled="route.showType == 'detail'"
                                    >否</van-radio
                                  >
                                </van-radio-group>
                              </template>
                            </van-field>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="card file mt20">
                      <div class="card-bar">
                        <div class="card-bar-title">上传附件</div>
                      </div>
                      <div class="card-container">
                        <van-field name="nucleic_test_image">
                          <template #label>
                            <div class="field-title">核酸检测报告</div>
                          </template>
                          <template #input>
                            <Uploader
                              v-model="residentItem.form.nucleic_test_image"
                              :max-count="1"
                              :disabled="route.showType == 'detail'"
                              file-dir="dlSchool/health/hsbg"
                            ></Uploader>
                          </template>
                        </van-field>
                        <van-field
                          v-if="residentItem.form.is_healthy == '1'"
                          name="health_code_image"
                        >
                          <template #label>
                            <div class="field-title">健康码</div>
                          </template>
                          <template #input>
                            <Uploader
                              v-model="residentItem.form.health_code_image"
                              :max-count="1"
                              :disabled="route.showType == 'detail'"
                              file-dir="dlSchool/health/jkm"
                            ></Uploader>
                          </template>
                        </van-field>
                        <van-field name="trip_code_image">
                          <template #label>
                            <div class="field-title">行程码</div>
                          </template>
                          <template #input>
                            <Uploader
                              v-model="residentItem.form.trip_code_image"
                              :max-count="1"
                              :disabled="route.showType == 'detail'"
                              file-dir="dlSchool/health/xcm"
                            ></Uploader>
                          </template>
                        </van-field>
                      </div>
                    </div>
                    <template #title>
                      <b>{{ residentItem.name }}</b>
                    </template>
                    <template #value>
                      {{ residentItem.isShow ? '收起' : '展开' }}
                    </template>
                  </van-collapse-item>
                </van-collapse>
              </div>
            </div>
          </div>

          <div class="card promise mt20" v-if="route.showType != 'detail'">
            <div class="card-container">
              <div class="mb20">
                <span style="color: #ee0a24; margin-right: 10px">*</span
                ><span>本人郑重承诺</span>
              </div>
              <van-checkbox-group
                style="font-size: 16px; padding: 0 10px"
                v-model="promise"
                direction="horizontal"
                @change="promiseChange"
              >
                <van-checkbox
                  checked-color="#D58913"
                  name="承诺"
                  shape="square"
                >
                  确认上述情况属实。根据《传染病防治法》及疫情防控要求，不如实提供信息将承担相应法律责任。</van-checkbox
                >
              </van-checkbox-group>
            </div>
          </div>
        </van-form>
      </div>

      <div class="bottom-bar" v-if="route.showType != 'detail'">
        <van-button
          class="bottom-bar-btn"
          block
          :disabled="!isPromise"
          size="large"
          color="#D58913"
          type="info"
          text="确认提交"
          @click="beforeSubmitAction"
        />
      </div>
    </div>
  </div>
</template>

<script>
import { identityTemp } from '@/libs/tools'
import {
  getResidentAllList,
  getHealthInfo,
  getFillingList,
  getStudentInfoById,
  saveHealthInfo,
  gethsjcsj,
  getYmjzqk,
  selectSchoolMessagelist,
} from '@/api/school'
import Map from '@/views/school/components/map'
import Resident from '@/views/school/components/resident'
import Uploader from '@/components/uploader'
import area from './dict/area'
import country from './dict/country'
import dict from './dict/studentHealth'
import dict1 from './dict/others'
import nationality from './dict/nationality'

export default {
  components: { Map, Resident, Uploader },
  data() {
    return {
      nationality,
      area,
      country,
      dict,
      dict1,
      route: {},
      data: {},
      formIndex: 0,
      addressIndex: 0,
      minDate: '',
      minDateTime: '',
      maxDate: '',
      maxDateTime: '',
      formType: '',
      userInfo: {},
      popupShow: false,
      popupState: '',
      pickerType: '',
      pickerData: [],
      userData: {},
      disabled: {},
      fillingList: [],
      activeNames: [],
      promise: [],
      isPromise: false,
      formData: [
        {
          close_flag: true,
          ascription: '',
          discomforwjc: true,
          discomforbqc: false,
          thirty_days_symptomArr: [],
          contact_situationArr: ['无接触'],
          dl_domestic_specific_placeArr: [{}],
          dl_abroad_specific_placeArr: [{}],
          domestic_specific_placeArr: [{}],
          abroad_specific_placeArr: [{}],
          paramList: [],
          is_healthy: '1',
          is_in_dl: '1',
          dl_is_go_out: '0',
          temperature: 36.5,
          healthy_code_colour: '1',
          healthy_code_colour_name: '绿色',
          traffic_mode: '6',
          traffic_mode_name: '校车',
          is_oneself_fill_in: '1',
          dl_is_has_quarantine: '3',
          dl_is_has_quarantine_name: '未曾进行过隔离',
          dl_is_nucleic_acid_test_name: '7天内未检测',
          dl_is_nucleic_acid_test: '1',
        },
      ],
      cascaderShow: false,
      cascaderValue: '',
      resident_id: '',
      cascadeOptions: [],
      fieldNames: {
        text: 'name',
        value: 'code',
        children: 'children',
      },
      residentList: [],
      messageList: [],
      messageListShow: false,
      userInfo: {},
    }
  },
  computed: {},
  watch: {},
  mounted() {
    this.userInfo = this.$store.state.user.userInfo
    this.route = this.$route.query
    this.nationality = this.$common.xeUtils.filter(
      this.nationality,
      (item) => !item.text.match('中国')
    )
    this.init()
  },
  methods: {
    contactSituationChange(e, formType, formIndex) {
      let form = {}
      if (formType == 'formData') {
        form = this.formData[0]
      } else if (formType == 'residentForm') {
        form = this.residentList[formIndex].form
      }
      const oneM = e.indexOf('一密')
      const twoM = e.indexOf('二密')
      if (oneM !== -1 && twoM !== -1) {
        if (oneM < twoM) {
          e.splice(oneM, 1)
        } else {
          e.splice(twoM, 1)
        }
      }
      if (
        e.indexOf('新冠肺炎确诊病例或无症状感染者') === -1 &&
        e.indexOf('新冠肺炎疑似感染者') === -1
      ) {
        form.close_flag = true
        if (oneM !== -1) {
          e.splice(oneM, 1)
        }
        if (twoM !== -1) {
          e.splice(twoM, 1)
        }
      }
      for (let i = 0; i < e.length; i++) {
        switch (e[i]) {
          case '无接触':
            form.discomforbqc = false
            form.discomforwjc = true
            form.close_flag = true
            break
          case '不清楚':
            form.discomforbqc = true
            form.discomforwjc = false
            form.close_flag = true
            break
          case '新冠肺炎确诊病例或无症状感染者':
            form.discomforwjc = false
            form.discomforbqc = false
            form.close_flag = false
            break
          case '新冠肺炎疑似感染者':
            form.discomforwjc = false
            form.discomforbqc = false
            form.close_flag = false
            break
          default:
            form.discomforwjc = false
            form.discomforbqc = false
            break
        }
      }
    },
    async init() {
      // 获取基本信息
      let param = { type: this.route.type }
      param.id = this.formData[0].student_id = this.route.student_id
      this.formData[0].type = this.route.type
      const baseInfo = await getStudentInfoById(param)
      if (baseInfo.data.errcode == 0) {
        this.$set(this.formData[0], 'name', baseInfo.data.data.name)
        this.$set(this.formData[0], 'card_no', baseInfo.data.data.card_no)
        this.$set(
          this.formData[0],
          'card_no_tmd',
          baseInfo.data.data.card_no_tmd
        )
        this.$set(this.formData[0], 'mobile', baseInfo.data.data.tel)
        this.$set(this.formData[0], 'area_code', baseInfo.data.data.area)
        this.$set(this.formData[0], 'area_name', baseInfo.data.data.area_name)
        this.$set(this.formData[0], 'street_code', baseInfo.data.data.street)
        this.$set(
          this.formData[0],
          'street_name',
          baseInfo.data.data.street_name
        )
        this.$set(
          this.formData[0],
          'community_code',
          baseInfo.data.data.community
        )
        this.$set(
          this.formData[0],
          'community_name',
          baseInfo.data.data.community_name
        )
        this.$set(this.formData[0], 'quarter', baseInfo.data.data.quarter)
        this.$set(
          this.formData[0],
          'ascription',
          baseInfo.data.data.area_name +
            '/' +
            baseInfo.data.data.street_name +
            '/' +
            baseInfo.data.data.community_name
        )
        this.$set(this.formData[0], 'address', baseInfo.data.data.address)
        this.$set(this.formData[0], 'lng', baseInfo.data.data.lng)
        this.$set(this.formData[0], 'lat', baseInfo.data.data.lat)
        this.getFillingList(baseInfo.data.data.school_id)
        this.getSchoolMessagelist(baseInfo.data.data.school_id)
        // 获取本人核酸信息
        gethsjcsj({
          card_no: baseInfo.data.data.card_no,
        }).then((res) => {
          if (res.data.errcode === 0 && res.data.data && res.data.data.hsjcsj) {
            if (!this.formData[0].hsjcsj) {
              this.$set(
                this.formData[0],
                'hsjcsj',
                this.$common.xeUtils.toDateString(
                  res.data.data.hsjcsj,
                  'yyyy-MM-dd HH:mm'
                )
              )
              this.changeDlIsNucleicAcidTest(
                res.data.data.hsjcsj,
                'formData',
                '0'
              )
            } else if (
              new Date(this.formData[0].hsjcsj) < new Date(res.data.data.hsjcsj)
            ) {
              this.$set(
                this.formData[0],
                'hsjcsj',
                this.$common.xeUtils.toDateString(
                  res.data.data.hsjcsj,
                  'yyyy-MM-dd HH:mm'
                )
              )
              this.changeDlIsNucleicAcidTest(
                res.data.data.hsjcsj,
                'formData',
                '0'
              )
            } else if (
              new Date(this.formData[0].hsjcsj) > new Date(res.data.data.hsjcsj)
            ) {
              this.changeDlIsNucleicAcidTest(
                this.formData[0].hsjcsj,
                'formData',
                '0'
              )
            }
          }
        })
        // 获取本人疫苗信息
        getYmjzqk({ card_no: baseInfo.data.data.card_no }).then((res) => {
          if (res.data.errcode === 0) {
            if (res.data.data.count) {
              this.$set(
                this.formData[0],
                'ym_time',
                '已接种' + res.data.data.count + '针'
              )
              this.$set(this.formData[0], 'ymjzqk', res.data.data.count)
            }
          }
        })
      }
      // 获取居住人列表
      this.getResidentList()
      // 获取历史填报信息
      const healthInfo = await getHealthInfo(param)
      if (
        healthInfo.data.errcode == 0 &&
        healthInfo.data.data &&
        healthInfo.data.data.length > 0
      ) {
        healthInfo.data.data[0] = {
          ...this.formData[0],
          ...healthInfo.data.data[0],
        }
        this.formData = healthInfo.data.data
        healthInfo.data.data.forEach((formItem, index) => {
          // 基础信息
          if (healthInfo.data.data[index].create_time)
            this.$set(
              this.formData[index],
              'create_time',
              healthInfo.data.data[index].create_time
            )
          if (healthInfo.data.data[index].hsjcsj)
            this.$set(
              this.formData[index],
              'hsjcsj',
              this.$common.xeUtils.toDateString(
                healthInfo.data.data[index].hsjcsj,
                'yyyy-MM-dd HH:mm'
              )
            )

          // 健康状况申报
          if (healthInfo.data.data[index].traffic_mode) {
            this.$set(
              this.formData[index],
              'traffic_mode',
              healthInfo.data.data[index].traffic_mode
            )
            this.$set(
              this.formData[index],
              'traffic_mode_name',
              this.dict.traffic_mode.find(
                (item) => item.value == healthInfo.data.data[index].traffic_mode
              ).text
            )
          }

          if (healthInfo.data.data[index].is_healthy) {
            this.$set(
              this.formData[index],
              'is_healthy',
              healthInfo.data.data[index].is_healthy
            )
          }
          if (healthInfo.data.data[index].thirty_days_symptom) {
            this.$set(
              this.formData[index],
              'thirty_days_symptom',
              healthInfo.data.data[index].thirty_days_symptom
            )
            this.$set(
              this.formData[index],
              'thirty_days_symptomArr',
              healthInfo.data.data[index].thirty_days_symptom.split(',')
            )
          } else {
            this.$set(this.formData[index], 'thirty_days_symptomArr', [])
          }
          // 健康码
          if (healthInfo.data.data[index].healthy_code_colour) {
            this.$set(
              this.formData[index],
              'healthy_code_colour',
              healthInfo.data.data[index].healthy_code_colour
            )
            this.$set(
              this.formData[index],
              'healthy_code_colour_name',
              this.dict.healthy_code_colour.find(
                (item) =>
                  item.value == healthInfo.data.data[index].healthy_code_colour
              ).text
            )
          }
          if (healthInfo.data.data[index].is_in_dl)
            this.$set(
              this.formData[index],
              'is_in_dl',
              healthInfo.data.data[index].is_in_dl
            )
          if (healthInfo.data.data[index].dl_is_go_out)
            this.$set(
              this.formData[index],
              'dl_is_go_out',
              healthInfo.data.data[index].dl_is_go_out
            )
          if (healthInfo.data.data[index].dl_go_out_place)
            this.$set(
              this.formData[index],
              'dl_go_out_place',
              healthInfo.data.data[index].dl_go_out_place
            )
          if (healthInfo.data.data[index].dl_domestic_specific_place) {
            let dl_domestic_specific_placeArr = JSON.parse(
              healthInfo.data.data[index].dl_domestic_specific_place
            )
            let new_dl_domestic_specific_placeArr = []
            dl_domestic_specific_placeArr.forEach((addressItem) => {
              new_dl_domestic_specific_placeArr.push({
                label:
                  addressItem[0].name +
                  '/' +
                  addressItem[1].name +
                  '/' +
                  addressItem[2].name,
                value: addressItem,
              })
            })
            this.$set(
              this.formData[index],
              'dl_domestic_specific_placeArr',
              new_dl_domestic_specific_placeArr
            )
          } else {
            this.$set(this.formData[index], 'dl_domestic_specific_placeArr', [
              {},
            ])
          }
          if (healthInfo.data.data[index].dl_abroad_specific_place) {
            this.$set(
              this.formData[index],
              'dl_abroad_specific_placeArr',
              JSON.parse(healthInfo.data.data[index].dl_abroad_specific_place)
            )
          } else {
            this.$set(this.formData[index], 'dl_abroad_specific_placeArr', [{}])
          }
          if (healthInfo.data.data[index].dl_estimate_leave_time)
            this.$set(
              this.formData[index],
              'dl_estimate_leave_time',
              healthInfo.data.data[index].dl_estimate_leave_time
            )
          if (healthInfo.data.data[index].dl_leave_reason)
            this.$set(
              this.formData[index],
              'dl_leave_reason',
              healthInfo.data.data[index].dl_leave_reason
            )
          if (healthInfo.data.data[index].dl_is_school_filling)
            this.$set(
              this.formData[index],
              'dl_is_school_filling',
              healthInfo.data.data[index].dl_is_school_filling
            )
          if (healthInfo.data.data[index].dl_flq_is_community_filling)
            this.$set(
              this.formData[index],
              'dl_flq_is_community_filling',
              healthInfo.data.data[index].dl_flq_is_community_filling
            )
          if (healthInfo.data.data[index].dl_lately_return_time)
            this.$set(
              this.formData[index],
              'dl_lately_return_time',
              healthInfo.data.data[index].dl_lately_return_time
            )
          if (healthInfo.data.data[index].dl_return_traffic_mode) {
            this.$set(
              this.formData[index],
              'dl_return_traffic_mode',
              healthInfo.data.data[index].dl_return_traffic_mode
            )
            this.$set(
              this.formData[index],
              'dl_return_traffic_mode_name',
              this.dict.return_traffic_mode.find(
                (item) =>
                  item.value ==
                  healthInfo.data.data[index].dl_return_traffic_mode
              ).text
            )
          }
          if (healthInfo.data.data[index].dl_return_shift)
            this.$set(
              this.formData[index],
              'dl_return_shift',
              healthInfo.data.data[index].dl_return_shift
            )
          if (healthInfo.data.data[index].dl_is_has_quarantine) {
            this.$set(
              this.formData[index],
              'dl_is_has_quarantine',
              healthInfo.data.data[index].dl_is_has_quarantine
            )

            this.$set(
              this.formData[index],
              'dl_is_has_quarantine_name',
              this.dict.dl_is_has_quarantine.find(
                (item) =>
                  item.value == healthInfo.data.data[index].dl_is_has_quarantine
              ).text
            )
          }
          if (healthInfo.data.data[index].dl_isolation_mode)
            this.$set(
              this.formData[index],
              'dl_isolation_mode',
              healthInfo.data.data[index].dl_isolation_mode
            )
          if (healthInfo.data.data[index].dl_isolation_start_time)
            this.$set(
              this.formData[index],
              'dl_isolation_start_time',
              healthInfo.data.data[index].dl_isolation_start_time
            )
          if (healthInfo.data.data[index].dl_isolation_end_time)
            this.$set(
              this.formData[index],
              'dl_isolation_end_time',
              healthInfo.data.data[index].dl_isolation_end_time
            )
          if (healthInfo.data.data[index].dl_is_nucleic_acid_test) {
            this.$set(
              this.formData[index],
              'dl_is_nucleic_acid_test',
              healthInfo.data.data[index].dl_is_nucleic_acid_test
            )
            this.$set(
              this.formData[index],
              'dl_is_nucleic_acid_test_name',
              this.dict.examine.find(
                (item) =>
                  item.value ==
                  healthInfo.data.data[index].dl_is_nucleic_acid_test
              ).text
            )
          }
          if (healthInfo.data.data[index].dl_is_serum_test) {
            this.$set(
              this.formData[index],
              'dl_is_serum_test',
              healthInfo.data.data[index].dl_is_serum_test
            )
            this.$set(
              this.formData[index],
              'dl_is_serum_test_name',
              this.dict.examine.find(
                (item) =>
                  item.value == healthInfo.data.data[index].dl_is_serum_test
              ).text
            )
          }
          if (healthInfo.data.data[index].temperature)
            this.$set(
              this.formData[index],
              'temperature',
              healthInfo.data.data[index].temperature
            )
          if (healthInfo.data.data[index].area_code)
            this.$set(
              this.formData[index],
              'area_code',
              healthInfo.data.data[index].area_code
            )
          if (healthInfo.data.data[index].area_name)
            this.$set(
              this.formData[index],
              'area_name',
              healthInfo.data.data[index].area_name
            )
          if (healthInfo.data.data[index].street_code)
            this.$set(
              this.formData[index],
              'street_code',
              healthInfo.data.data[index].street_code
            )
          if (healthInfo.data.data[index].street_name)
            this.$set(
              this.formData[index],
              'street_name',
              healthInfo.data.data[index].street_name
            )
          if (healthInfo.data.data[index].community_code)
            this.$set(
              this.formData[index],
              'community_code',
              healthInfo.data.data[index].community_code
            )
          if (healthInfo.data.data[index].community_name)
            this.$set(
              this.formData[index],
              'community_name',
              healthInfo.data.data[index].community_name
            )
          if (healthInfo.data.data[index].quarter)
            this.$set(
              this.formData[index],
              'quarter',
              healthInfo.data.data[index].quarter
            )
          if (
            healthInfo.data.data[index].area_name &&
            healthInfo.data.data[index].street_name &&
            healthInfo.data.data[index].community_name
          ) {
            this.$set(
              this.formData[index],
              'ascription',
              healthInfo.data.data[index].area_name +
                '/' +
                healthInfo.data.data[index].street_name +
                '/' +
                healthInfo.data.data[index].community_name
            )
          }
          if (healthInfo.data.data[index].address)
            this.$set(
              this.formData[index],
              'address',
              healthInfo.data.data[index].address
            )
          if (healthInfo.data.data[index].lng)
            this.$set(
              this.formData[index],
              'lng',
              healthInfo.data.data[index].lng
            )
          if (healthInfo.data.data[index].lat)
            this.$set(
              this.formData[index],
              'lat',
              healthInfo.data.data[index].lat
            )

          // 所在位置
          if (healthInfo.data.data[index].out_of_place)
            this.$set(
              this.formData[index],
              'out_of_place',
              healthInfo.data.data[index].out_of_place
            )
          if (healthInfo.data.data[index].domestic_specific_place) {
            let domestic_specific_placeArr = JSON.parse(
              healthInfo.data.data[index].domestic_specific_place
            )
            let new_domestic_specific_placeArr = []
            domestic_specific_placeArr.forEach((addressItem) => {
              new_domestic_specific_placeArr.push({
                label:
                  addressItem[0].name +
                  '/' +
                  addressItem[1].name +
                  '/' +
                  addressItem[2].name,
                value: addressItem,
              })
            })
            this.$set(
              this.formData[index],
              'domestic_specific_placeArr',
              new_domestic_specific_placeArr
            )
          } else {
            this.$set(this.formData[index], 'domestic_specific_placeArr', [{}])
          }
          if (healthInfo.data.data[index].abroad_specific_place) {
            this.$set(
              this.formData[index],
              'abroad_specific_placeArr',
              JSON.parse(healthInfo.data.data[index].abroad_specific_place)
            )
          } else {
            this.$set(this.formData[index], 'abroad_specific_placeArr', [{}])
          }
          if (healthInfo.data.data[index].estimate_leave_time)
            this.$set(
              this.formData[index],
              'estimate_leave_time',
              healthInfo.data.data[index].estimate_leave_time
            )
          if (healthInfo.data.data[index].leave_reason)
            this.$set(
              this.formData[index],
              'leave_reason',
              healthInfo.data.data[index].leave_reason
            )
          if (healthInfo.data.data[index].is_school_filling)
            this.$set(
              this.formData[index],
              'is_school_filling',
              healthInfo.data.data[index].is_school_filling
            )
          if (healthInfo.data.data[index].estimate_return_time)
            this.$set(
              this.formData[index],
              'estimate_return_time',
              healthInfo.data.data[index].estimate_return_time
            )
          if (healthInfo.data.data[index].return_traffic_mode) {
            this.$set(
              this.formData[index],
              'return_traffic_mode',
              healthInfo.data.data[index].return_traffic_mode
            )
            this.$set(
              this.formData[index],
              'return_traffic_mode_name',
              this.dict.return_traffic_mode.find(
                (item) =>
                  item.value == healthInfo.data.data[index].return_traffic_mode
              ).text
            )
          }
          if (healthInfo.data.data[index].return_shift)
            this.$set(
              this.formData[index],
              'return_shift',
              healthInfo.data.data[index].return_shift
            )
          if (healthInfo.data.data[index].contact_situation) {
            this.$set(
              this.formData[index],
              'contact_situation',
              healthInfo.data.data[index].contact_situation
            )
            this.$set(
              this.formData[index],
              'contact_situationArr',
              healthInfo.data.data[index].contact_situation.split(',')
            )
            for (
              let i = 0;
              i < this.formData[index].contact_situationArr.length;
              i++
            ) {
              if (this.formData[index].contact_situationArr[i] == '无接触') {
                this.$set(this.formData[index], 'discomforwjc', true)
                this.$set(this.formData[index], 'discomforbqc', false)
              } else if (
                this.formData[index].contact_situationArr[i] == '不清楚'
              ) {
                this.$set(this.formData[index], 'discomforwjc', false)
                this.$set(this.formData[index], 'discomforbqc', true)
              } else {
                this.$set(this.formData[index], 'discomforwjc', false)
                this.$set(this.formData[index], 'discomforbqc', false)
              }
            }
          } else {
            this.$set(this.formData[index], 'contact_situationArr', [])
            this.$set(this.formData[index], 'discomforwjc', false)
            this.$set(this.formData[index], 'discomforbqc', false)
          }

          // 其他
          if (healthInfo.data.data[index].mask_reserve) {
            this.$set(
              this.formData[index],
              'mask_reserve',
              healthInfo.data.data[index].mask_reserve
            )
            this.$set(
              this.formData[index],
              'mask_reserve_name',
              this.dict.mask_reserve.find(
                (item) => item.value == healthInfo.data.data[index].mask_reserve
              ).text
            )
          }
          if (healthInfo.data.data[index].is_oneself_fill_in)
            this.$set(
              this.formData[index],
              'is_oneself_fill_in',
              healthInfo.data.data[index].is_oneself_fill_in
            )
          if (healthInfo.data.data[index].filled_by_name)
            this.$set(
              this.formData[index],
              'filled_by_name',
              healthInfo.data.data[index].filled_by_name
            )
          if (healthInfo.data.data[index].filled_by_tel)
            this.$set(
              this.formData[index],
              'filled_by_tel',
              healthInfo.data.data[index].filled_by_tel
            )
          if (healthInfo.data.data[index].filled_by_relationship) {
            this.$set(
              this.formData[index],
              'filled_by_relationship',
              healthInfo.data.data[index].filled_by_relationship
            )
            this.$set(
              this.formData[index],
              'filled_by_relationship_name',
              this.dict.relationship.find(
                (item) =>
                  item.value ==
                  healthInfo.data.data[index].filled_by_relationship
              ).text
            )
          }

          // 动态填报信息
          if (healthInfo.data.data[index].param) {
            this.$set(
              this.formData[index],
              'paramList',
              JSON.parse(healthInfo.data.data[index].param)
            )
            if (
              this.formData[index].paramList.length > 0 &&
              this.fillingList.length > 0
            ) {
              this.formData[index].paramList.forEach((paramItem) => {
                this.fillingList.forEach((fillingItem) => {
                  if (paramItem.id == fillingItem.id) {
                    this.$set(
                      this.formData[index],
                      fillingItem.key_num,
                      paramItem[fillingItem.key_num]
                    )
                  }
                })
              })
            }
          } else {
            this.$set(this.formData[index], 'paramList', [])
          }

          // 风险人群
          if (healthInfo.data.data[index].is_fxrq_jkll_br)
            this.$set(
              this.formData[index],
              'is_fxrq_jkll_br',
              healthInfo.data.data[index].is_fxrq_jkll_br
            )
          if (healthInfo.data.data[index].is_fxrq_jzyx_br)
            this.$set(
              this.formData[index],
              'is_fxrq_jzyx_br',
              healthInfo.data.data[index].is_fxrq_jzyx_br
            )
          if (healthInfo.data.data[index].is_fxrq_xgfy_br)
            this.$set(
              this.formData[index],
              'is_fxrq_xgfy_br',
              healthInfo.data.data[index].is_fxrq_xgfy_br
            )
          if (healthInfo.data.data[index].is_fxrq_bj_br)
            this.$set(
              this.formData[index],
              'is_fxrq_bj_br',
              healthInfo.data.data[index].is_fxrq_bj_br
            )
          if (healthInfo.data.data[index].is_fxrq_nrsq_br)
            this.$set(
              this.formData[index],
              'is_fxrq_nrsq_br',
              healthInfo.data.data[index].is_fxrq_nrsq_br
            )

          // 上传附件
          if (healthInfo.data.data[index].nucleic_test_image)
            this.$set(
              this.formData[index],
              'nucleic_test_image',
              healthInfo.data.data[index].nucleic_test_image.replace(
                'http://10.195.107.22:9864',
                'http://daliandl.lngov.top'
              )
            )
          if (healthInfo.data.data[index].health_code_image)
            this.$set(
              this.formData[index],
              'health_code_image',
              healthInfo.data.data[index].health_code_image.replace(
                'http://10.195.107.22:9864',
                'http://daliandl.lngov.top'
              )
            )
          if (healthInfo.data.data[index].trip_code_image)
            this.$set(
              this.formData[index],
              'trip_code_image',
              healthInfo.data.data[index].trip_code_image.replace(
                'http://10.195.107.22:9864',
                'http://daliandl.lngov.top'
              )
            )
          this.residentList.forEach((listItem) => {
            if (listItem.id == formItem.cohabitation_id) {
              listItem.isChecked = true
              listItem.form = { ...listItem.form, ...formItem }
              this.activeNames.push(listItem.id)
              listItem.isShow = true
            }
          })
        })
      }
      // 设置当日日期
      this.$set(
        this.formData[0],
        'c_date',
        this.$common.xeUtils.toDateString(new Date(), 'yyyy-MM-dd')
      )
      this.$set(
        this.formData[0],
        'date',
        this.$common.xeUtils.toDateString(new Date(), 'yyyyMMdd')
      )
    },
    async getSchoolMessagelist(school_id) {
      const messageList = await selectSchoolMessagelist({
        school_id: school_id,
      })
      if (messageList.data.errcode == 0) {
        this.messageList = messageList.data.data
        if (this.messageList.length > 0) {
          this.messageListShow = true
        }
      }
    },
    async getFillingList(school_id) {
      const fillingList = await getFillingList({ school_id: school_id })
      if (fillingList.data.errcode == 0) {
        this.fillingList = fillingList.data.data
        if (this.formData.length > 0) {
          this.formData.forEach((formItem, index) => {
            if (
              this.formData[index].paramList.length > 0 &&
              this.fillingList.length > 0
            ) {
              this.formData[index].paramList.forEach((paramItem) => {
                this.fillingList.forEach((fillingItem) => {
                  if (paramItem.id == fillingItem.id) {
                    this.$set(
                      this.formData[index],
                      fillingItem.key_num,
                      paramItem[fillingItem.key_num]
                    )
                  }
                })
              })
            }
          })
        }
      }
    },
    async getResidentList() {
      const residentInfo = await getResidentAllList({
        ...this.route,
        card_no: this.formData[0].card_no,
      })
      // console.log(residentInfo.data)
      if (residentInfo.data.errcode == 0) {
        residentInfo.data.data.forEach((listItem, index) => {
          listItem.isChecked = false
          listItem.isShow = false
          listItem.form = {
            c_date: this.formData[0].c_date,
            cohabitation_id: listItem.id,
            name: listItem.name,
            mobile: listItem.tel,
            card_no: listItem.card_no,
            card_no_tmd: listItem.card_no_tmd,
            thirty_days_symptomArr: [],
            contact_situationArr: ['无接触'],
            paramList: [],
            dl_domestic_specific_placeArr: [{}],
            dl_abroad_specific_placeArr: [{}],
            domestic_specific_placeArr: [{}],
            abroad_specific_placeArr: [{}],
            is_healthy: '1',
            dl_is_go_out: '0',
            discomforwjc: true,
            close_flag: true,
            discomforbqc: false,
            is_fxrq_jkll_br: '1',
            is_fxrq_jzyx_br: '1',
            is_fxrq_xgfy_br: '1',
            is_fxrq_bj_br: '1',
            is_fxrq_nrsq_br: '1',
            is_in_dl: '1',
            temperature: 36.5,
            healthy_code_colour: '1',
            healthy_code_colour_name: '绿色',
            traffic_mode: '6',
            traffic_mode_name: '校车',
            is_oneself_fill_in: '1',
            dl_is_has_quarantine: '3',
            dl_is_has_quarantine_name: '未曾进行过隔离',
            dl_is_nucleic_acid_test_name: '7天内未检测',
            dl_is_nucleic_acid_test: '1',
            ...this.route,
          }
          this.formData.forEach((formItem) => {
            if (listItem.id == formItem.cohabitation_id) {
              listItem.isChecked = true
              listItem.form = { ...listItem.form, ...formItem }
              this.activeNames.push(listItem.id)
              listItem.isShow = true
            }
          })
          // 获取核酸信息
          gethsjcsj({
            card_no: listItem.card_no,
          }).then((res) => {
            if (
              res.data.errcode === 0 &&
              res.data.data &&
              res.data.data.hsjcsj
            ) {
              this.$set(listItem.form, 'res', res)
              if (!listItem.form.hsjcsj) {
                this.$set(
                  listItem.form,
                  'hsjcsj',
                  this.$common.xeUtils.toDateString(
                    res.data.data.hsjcsj,
                    'yyyy-MM-dd HH:mm'
                  )
                )
                this.$set(listItem.form, 'msg1', res.data.data.hsjcsj)
                this.$set(
                  listItem.form,
                  'msg2',
                  this.$common.xeUtils.toDateString(
                    res.data.data.hsjcsj,
                    'yyyy-MM-dd HH:mm'
                  )
                )
                this.changeDlIsNucleicAcidTest(
                  res.data.data.hsjcsj,
                  'residentForm',
                  index
                )
              } else if (
                new Date(listItem.form.hsjcsj) < new Date(res.data.data.hsjcsj)
              ) {
                this.$set(
                  listItem.form,
                  'hsjcsj',
                  this.$common.xeUtils.toDateString(
                    res.data.data.hsjcsj,
                    'yyyy-MM-dd HH:mm'
                  )
                )
                this.changeDlIsNucleicAcidTest(
                  res.data.data.hsjcsj,
                  'residentForm',
                  index
                )
              } else if (
                new Date(listItem.form.hsjcsj) > new Date(res.data.data.hsjcsj)
              ) {
                this.changeDlIsNucleicAcidTest(
                  listItem.form.hsjcsj,
                  'residentForm',
                  index
                )
              }
            }
          })
          // 获取疫苗信息
          getYmjzqk({ card_no: listItem.card_no }).then((res) => {
            if (res.data.errcode === 0) {
              if (res.data.data.count) {
                this.$set(
                  listItem.form,
                  'ym_time',
                  '已接种' + res.data.data.count + '针'
                )
                this.$set(listItem.form, 'ymjzqk', res.data.data.count)
              }
            }
          })
        })
        this.residentList = residentInfo.data.data
      }
    },
    changeDlIsNucleicAcidTest(hsjcsj, formType, formIndex) {
      let form = {}
      if (formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[formIndex].form
      }
      let date = (Date.parse(new Date()) - Date.parse(hsjcsj)) / 60 / 60 / 1000
      if (date <= 24) {
        form.dl_is_nucleic_acid_test = '3'
        form.dl_is_nucleic_acid_test_name = '24小时'
      } else if (date <= 48) {
        form.dl_is_nucleic_acid_test = '4'
        form.dl_is_nucleic_acid_test_name = '48小时'
      } else if (date <= 72) {
        form.dl_is_nucleic_acid_test = '5'
        form.dl_is_nucleic_acid_test_name = '72小时'
      } else if (date <= 168) {
        form.dl_is_nucleic_acid_test = '2'
        form.dl_is_nucleic_acid_test_name = '7天内检测过'
      } else {
        form.dl_is_nucleic_acid_test = '1'
        form.dl_is_nucleic_acid_test_name = '7天内未检测'
      }
    },
    editAction(item) {
      this.resident_id = item.id
      this.pickerChange('gtjzz')
    },
    // deleAction(item) {
    //   this.$toast('无法删除' + item.name)
    // },
    checkAction(listItem) {
      listItem.isChecked = !listItem.isChecked
      if (listItem.isChecked) {
        this.activeNames.push(listItem.id)
        listItem.isShow = true
      } else {
        this.activeNames.forEach((item, index) => {
          if (item == listItem.id) {
            this.activeNames.splice(index, 1)
            listItem.isShow = false
          }
        })
      }
    },
    promiseChange(e) {
      if (e.length > 0) {
        this.isPromise = true
      } else {
        this.isPromise = false
      }
    },
    collapseChange(e) {
      if (e.length > 0) {
        this.residentList.forEach((listItem) => {
          e.forEach((item) => {
            if (item == listItem.id) {
              listItem.isShow = true
            } else {
              listItem.isShow = false
            }
          })
        })
      } else {
        this.residentList.forEach((listItem) => {
          listItem.isShow = false
        })
      }
    },
    searchChange() {
      if (this.data.search) {
        this.pickerData = this.$common.xeUtils.filter(
          this.nationality,
          (item) => item.text.match(this.data.search)
        )
      } else {
        this.pickerData = this.nationality
      }
    },
    getLocation() {
      if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(
          (res) => {
            console.log('res', res) //位置信息
            this.formData[0].lng = res.coords.longitude
            this.formData[0].lat = res.coords.latitude
            this.$toast('获取定位成功')
          },
          (res) => {
            console.log('err', res) //位置信息
            this.$toast('获取定位失败')
          },
          {
            enableHighAccuracy: true, // 高精度
            timeout: 10000, // 超时时间
          }
        )
      } else {
        this.$toast('定位失败')
      }
    },
    pickerChange(type, formType, formIndex, addressIndex) {
      if (this.route.showType != 'detail') {
        this.pickerType = type
        this.formType = formType
        this.formIndex = formIndex
        this.addressIndex = addressIndex
        let options = []
        switch (type) {
          case 'ascription':
            this.popupState = 'cascader'
            options = this.$common.xeUtils.toArrayTree(this.area, {
              strict: true,
              parentKey: 'parent_id',
              key: 'id',
              children: 'children',
            })
            this.cascadeOptions = options[0].children
            this.popupShow = true
            break
          case 'dl_domestic_specific_placeArr':
            this.popupState = 'cascader'
            options = this.$common.xeUtils.toArrayTree(this.country, {
              strict: true,
              parentKey: 'parent_code',
              key: 'code',
              children: 'children',
            })
            this.cascadeOptions = options[0].children
            this.popupShow = true
            break
          case 'domestic_specific_placeArr':
            this.popupState = 'cascader'
            options = this.$common.xeUtils.toArrayTree(this.country, {
              strict: true,
              parentKey: 'parent_code',
              key: 'code',
              children: 'children',
            })
            this.cascadeOptions = options[0].children
            this.popupShow = true
            break
          case 'map':
            this.popupState = 'map'
            this.popupShow = true
            break
          case 'gtjzz':
            this.popupState = 'gtjzz'
            this.popupShow = true
            break
          case 'traffic_mode':
            this.popupState = 'picker'
            this.pickerData = this.dict.traffic_mode
            this.popupShow = true
            break
          case 'healthy_code_colour':
            this.popupState = 'picker'
            this.pickerData = this.dict.healthy_code_colour
            this.popupShow = true
            break
          case 'dl_return_traffic_mode':
            this.popupState = 'picker'
            this.pickerData = this.dict.return_traffic_mode
            this.popupShow = true
            break
          case 'dl_is_has_quarantine':
            this.popupState = 'picker'
            this.pickerData = this.dict.dl_is_has_quarantine
            this.popupShow = true
            break
          case 'dl_is_nucleic_acid_test':
            this.popupState = 'picker'
            this.pickerData = this.dict.examine
            this.popupShow = true
            break
          case 'dl_is_serum_test':
            this.popupState = 'picker'
            this.pickerData = this.dict.examine
            this.popupShow = true
            break
          case 'return_traffic_mode':
            this.popupState = 'picker'
            this.pickerData = this.dict.return_traffic_mode
            this.popupShow = true
            break
          case 'mask_reserve':
            this.popupState = 'picker'
            this.pickerData = this.dict.mask_reserve
            this.popupShow = true
            break
          case 'filled_by_relationship':
            this.popupState = 'picker'
            this.pickerData = this.dict.relationship
            this.popupShow = true
            break
          case 'dl_abroad_specific_placeArr':
            this.popupState = 'picker'
            this.pickerData = this.nationality
            this.popupShow = true
            break
          case 'abroad_specific_placeArr':
            this.popupState = 'picker'
            this.pickerData = this.nationality
            this.popupShow = true
            break
          case 'dl_estimate_leave_time':
            this.popupState = 'datePicker'
            this.minDate = new Date(
              new Date().setFullYear(new Date().getFullYear() - 1)
            )
            this.maxDate = new Date()
            this.popupShow = true
            break
          case 'dl_important_address_time':
            this.popupState = 'datePicker'
            this.minDate = new Date(
              new Date().setFullYear(new Date().getFullYear() - 1)
            )
            this.maxDate = new Date()
            this.popupShow = true
            break
          case 'estimate_leave_time':
            this.popupState = 'datePicker'
            this.minDate = new Date(
              new Date().setFullYear(new Date().getFullYear() - 1)
            )
            this.maxDate = new Date()
            this.popupShow = true
            break
          case 'dl_lately_return_time':
            this.popupState = 'datePicker'
            this.minDate = new Date(new Date() - 1000 * 60 * 60 * 24 * 14)
            this.maxDate = new Date()
            this.popupShow = true
            break
          case 'dl_isolation_start_time':
            this.popupState = 'datePicker'
            this.minDate = new Date(new Date() - 1000 * 60 * 60 * 24 * 30)
            this.maxDate = new Date()
            this.popupShow = true
            break
          case 'dl_isolation_end_time':
            this.popupState = 'datePicker'
            this.minDate = new Date(new Date() - 1000 * 60 * 60 * 24 * 30)
            this.maxDate = new Date(
              new Date().setMonth(new Date().getMonth() + 1)
            )
            this.popupShow = true
            break
          case 'estimate_return_time':
            this.popupState = 'datePicker'
            this.minDate = new Date()
            this.maxDate = new Date(
              new Date().setFullYear(new Date().getFullYear() + 1)
            )
            this.popupShow = true
            break
          case 'hsjcsj':
            this.popupState = 'dateTimePicker'
            this.minDateTime = new Date(new Date() - 1000 * 60 * 60 * 24 * 30)
            this.maxDateTime = new Date()
            this.popupShow = true
            break
        }
      }
    },
    pickerConfirm(e) {
      let form = {}
      if (this.formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[this.formIndex].form
      }
      switch (this.pickerType) {
        case 'traffic_mode':
          form.traffic_mode_name = e.text
          form.traffic_mode = e.value
          this.popupShow = false
          break
        case 'healthy_code_colour':
          form.healthy_code_colour_name = e.text
          form.healthy_code_colour = e.value
          this.popupShow = false
          break
        case 'dl_return_traffic_mode':
          form.dl_return_traffic_mode_name = e.text
          form.dl_return_traffic_mode = e.value
          this.popupShow = false
          break
        case 'dl_is_has_quarantine':
          form.dl_is_has_quarantine_name = e.text
          form.dl_is_has_quarantine = e.value
          this.popupShow = false
          break
        case 'dl_is_nucleic_acid_test':
          form.dl_is_nucleic_acid_test_name = e.text
          form.dl_is_nucleic_acid_test = e.value
          this.popupShow = false
          break
        case 'dl_is_serum_test':
          form.dl_is_serum_test_name = e.text
          form.dl_is_serum_test = e.value
          this.popupShow = false
          break
        case 'return_traffic_mode':
          form.return_traffic_mode_name = e.text
          form.return_traffic_mode = e.value
          this.popupShow = false
          break
        case 'mask_reserve':
          form.mask_reserve_name = e.text
          form.mask_reserve = e.value
          this.popupShow = false
          break
        case 'filled_by_relationship':
          form.filled_by_relationship_name = e.text
          form.filled_by_relationship = e.value
          this.popupShow = false
          break
        case 'dl_abroad_specific_placeArr':
          form.dl_abroad_specific_placeArr[this.addressIndex].label = e.text
          form.dl_abroad_specific_placeArr[this.addressIndex].value = e.value
          this.popupShow = false
          break
        case 'abroad_specific_placeArr':
          form.abroad_specific_placeArr[this.addressIndex].label = e.text
          form.abroad_specific_placeArr[this.addressIndex].value = e.value
          this.popupShow = false
          break
      }
    },
    pickerCancel(e) {
      let form = {}
      if (this.formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[this.formIndex].form
      }
      switch (this.pickerType) {
        case 'traffic_mode':
          form.traffic_mode_name = ''
          form.traffic_mode = ''
          this.popupShow = false
          break
        case 'healthy_code_colour':
          form.healthy_code_colour_name = ''
          form.healthy_code_colour = ''
          this.popupShow = false
          break
        case 'dl_return_traffic_mode':
          form.dl_return_traffic_mode_name = ''
          form.dl_return_traffic_mode = ''
          this.popupShow = false
          break
        case 'dl_is_has_quarantine':
          form.dl_is_has_quarantine_name = ''
          form.dl_is_has_quarantine = ''
          this.popupShow = false
          break
        case 'dl_is_nucleic_acid_test':
          form.dl_is_nucleic_acid_test_name = ''
          form.dl_is_nucleic_acid_test = ''
          this.popupShow = false
          break
        case 'dl_is_serum_test':
          form.dl_is_serum_test_name = ''
          form.dl_is_serum_test = ''
          this.popupShow = false
          break
        case 'return_traffic_mode':
          form.return_traffic_mode_name = ''
          form.return_traffic_mode = ''
          this.popupShow = false
          break
        case 'mask_reserve':
          form.mask_reserve_name = ''
          form.mask_reserve = ''
          this.popupShow = false
          break
        case 'filled_by_relationship':
          form.filled_by_relationship_name = ''
          form.filled_by_relationship = ''
          this.popupShow = false
          break
        case 'dl_abroad_specific_placeArr':
          form.dl_abroad_specific_placeArr[this.addressIndex] = {}
          this.popupShow = false
          break
        case 'abroad_specific_placeArr':
          form.abroad_specific_placeArr[this.addressIndex] = {}
          this.popupShow = false
          break
      }
    },
    datePickerConfirm(e) {
      let form = {}
      if (this.formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[this.formIndex].form
      }
      switch (this.pickerType) {
        case 'dl_important_address_time':
          form.dl_important_address_time = this.$common.xeUtils.toDateString(
            e,
            'yyyy-MM-dd'
          )
          this.popupShow = false
          break
        case 'dl_estimate_leave_time':
          form.dl_estimate_leave_time = this.$common.xeUtils.toDateString(
            e,
            'yyyy-MM-dd'
          )
          this.popupShow = false
          break
        case 'estimate_leave_time':
          form.estimate_leave_time = this.$common.xeUtils.toDateString(
            e,
            'yyyy-MM-dd'
          )
          this.popupShow = false
          break
        case 'dl_lately_return_time':
          form.dl_lately_return_time = this.$common.xeUtils.toDateString(
            e,
            'yyyy-MM-dd'
          )
          this.popupShow = false
          break
        case 'dl_isolation_start_time':
          form.dl_isolation_start_time = this.$common.xeUtils.toDateString(
            e,
            'yyyy-MM-dd'
          )
          this.popupShow = false
          break
        case 'dl_isolation_end_time':
          form.dl_isolation_end_time = this.$common.xeUtils.toDateString(
            e,
            'yyyy-MM-dd'
          )
          this.popupShow = false
          break
        case 'estimate_return_time':
          form.estimate_return_time = this.$common.xeUtils.toDateString(
            e,
            'yyyy-MM-dd'
          )
          this.popupShow = false
          break
      }
    },
    datePickerCancel(e) {
      let form = {}
      if (this.formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[this.formIndex].form
      }
      switch (this.pickerType) {
        case 'dl_important_address_time':
          form.dl_important_address_time = ''
          this.popupShow = false
          break
        case 'dl_estimate_leave_time':
          form.dl_estimate_leave_time = ''
          this.popupShow = false
          break
        case 'estimate_leave_time':
          form.estimate_leave_time = ''
          this.popupShow = false
          break
        case 'dl_lately_return_time':
          form.dl_lately_return_time = ''
          this.popupShow = false
          break
        case 'dl_isolation_start_time':
          form.dl_isolation_start_time = ''
          this.popupShow = false
          break
        case 'dl_isolation_end_time':
          form.dl_isolation_end_time = ''
          this.popupShow = false
          break
        case 'estimate_return_time':
          form.estimate_return_time = ''
          this.popupShow = false
          break
      }
    },
    dateTimePickerConfirm(e) {
      let form = {}
      if (this.formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[this.formIndex].form
      }
      form.hsjcsj = this.$common.xeUtils.toDateString(e, 'yyyy-MM-dd HH:mm')
      this.changeDlIsNucleicAcidTest(e, this.formType, this.formIndex)
      this.popupShow = false
    },
    dateTimePickerCancel(e) {
      let form = {}
      if (this.formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[this.formIndex].form
      }
      form.hsjcsj = null
      this.popupShow = false
    },
    cascaderFinish({ value, selectedOptions, tabIndex }) {
      let form = {}
      if (this.formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[this.formIndex].form
      }
      switch (this.pickerType) {
        case 'ascription':
          form.ascription =
            selectedOptions[0].name +
            '/' +
            selectedOptions[1].name +
            '/' +
            selectedOptions[2].name
          form.area_code = selectedOptions[0].code
          form.street_code = selectedOptions[1].code
          form.community_code = selectedOptions[2].code
          form.area_name = selectedOptions[0].name
          form.street_name = selectedOptions[1].name
          form.community_name = selectedOptions[2].name
          break
        case 'dl_domestic_specific_placeArr':
          form.dl_domestic_specific_placeArr[this.addressIndex].label =
            selectedOptions[0].name +
            '/' +
            selectedOptions[1].name +
            '/' +
            selectedOptions[2].name
          form.dl_domestic_specific_placeArr[this.addressIndex].value = [
            { name: selectedOptions[0].name, code: selectedOptions[0].code },
            { name: selectedOptions[1].name, code: selectedOptions[1].code },
            { name: selectedOptions[2].name, code: selectedOptions[2].code },
          ]
          break
        case 'domestic_specific_placeArr':
          form.domestic_specific_placeArr[this.addressIndex].label =
            selectedOptions[0].name +
            '/' +
            selectedOptions[1].name +
            '/' +
            selectedOptions[2].name
          form.domestic_specific_placeArr[this.addressIndex].value = [
            { name: selectedOptions[0].name, code: selectedOptions[0].code },
            { name: selectedOptions[1].name, code: selectedOptions[1].code },
            { name: selectedOptions[2].name, code: selectedOptions[2].code },
          ]
          break
      }
      this.popupShow = false
    },
    cascaderClose() {
      let form = {}
      if (this.formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[this.formIndex].form
      }
      switch (this.pickerType) {
        case 'ascription':
          form.ascription = ''
          form.area_code = ''
          form.street_code = ''
          form.community_code = ''
          form.area_name = ''
          form.street_name = ''
          form.community_name = ''
          this.popupShow = false
          break
        case 'dl_domestic_specific_placeArr':
          form.dl_domestic_specific_placeArr[this.addressIndex] = {}
          this.popupShow = false
          break
        case 'domestic_specific_placeArr':
          form.domestic_specific_placeArr[this.addressIndex] = {}
          this.popupShow = false
          break
      }
    },
    addressAdd(type, formType, formIndex) {
      let form = {}
      if (formType == 'formData') {
        form = this.formData[0]
      } else if (formType == 'residentForm') {
        form = this.residentList[formIndex].form
      }
      switch (type) {
        case 'dl_domestic_specific_placeArr':
          form.dl_domestic_specific_placeArr.push({})
          break
        case 'dl_abroad_specific_placeArr':
          form.dl_abroad_specific_placeArr.push({})
          break
        case 'domestic_specific_placeArr':
          form.domestic_specific_placeArr.push({})
          break
        case 'abroad_specific_placeArr':
          form.abroad_specific_placeArr.push({})
          break
      }
    },
    addressDel(type, formType, formIndex, addressIndex) {
      let form = {}
      if (formType == 'formData') {
        form = this.formData[0]
      } else if (this.formType == 'residentForm') {
        form = this.residentList[formIndex].form
      }
      switch (type) {
        case 'dl_domestic_specific_placeArr':
          form.dl_domestic_specific_placeArr.splice(addressIndex, 1)
          break
        case 'dl_abroad_specific_placeArr':
          form.dl_abroad_specific_placeArr.splice(addressIndex, 1)
          break
        case 'domestic_specific_placeArr':
          form.domestic_specific_placeArr.splice(addressIndex, 1)
          break
        case 'abroad_specific_placeArr':
          form.abroad_specific_placeArr.splice(addressIndex, 1)
          break
      }
    },
    failNotice(msg) {
      this.$notify({ type: 'danger', message: msg })
    },
    onFailed(errorInfo) {
      this.failNotice(errorInfo.errors[0].message)
    },
    // 体温校验
    tempValidator(val) {
      return identityTemp(val)
    },
    beforeSubmitAction() {
      this.$refs.form.submit()
    },
    getLngLat(e) {
      this.formData[0].lng = e.lng
      this.formData[0].lat = e.lat
      this.popupClose()
    },
    getResident() {
      this.getResidentList()
      this.popupClose()
    },
    popupClose() {
      this.popupState = ''
      this.resident_id = ''
      this.cascaderValue = ''
      this.formIndex = 0
      this.popupShow = false
    },
    onSubmit() {
      //附件校验
      // if (
      //   this.formData[0].is_healthy == '1' &&
      //   !this.formData[0].health_code_image
      // ) {
      //   this.$notify({ type: 'danger', message: '请检查健康码' })
      //   return
      // }
      // for (let i = 0; i < this.residentList.length; i++) {
      //   if (this.residentList[i].isChecked) {
      //     if (
      //       this.residentList[i].form.is_healthy == '1' &&
      //       !this.residentList[i].form.health_code_image
      //     ) {
      //       this.$notify({ type: 'danger', message: '请检查健康码' })
      //       return
      //     }
      //   }
      // }
      //校验
      // const today = this.$common.xeUtils.toDateString(new Date(), 'yyyy-MM-dd')
      // const latest = this.$common.xeUtils.toDateString(
      //   this.formData[0].create_time || '',
      //   'yyyy-MM-dd'
      // )
      // if (today == latest) {
      //   this.$toast('当日已填报，请勿重复上报')
      //   return
      // }
      // 获取位置
      this.submitAction()
    },
    submitAction() {
      // 数据处理
      if (this.formData.length > 1) {
        let length = this.formData.length - 1
        for (let index = 0; index < length; index++) {
          this.formData.pop()
        }
      }
      this.residentList.forEach((residentItem) => {
        if (residentItem.isChecked) {
          this.formData.push(residentItem.form)
        }
      })
      this.formData.forEach((formItem) => {
        if (formItem.hsjcsj) {
          formItem.hsjcsj = this.$common.xeUtils.toDateString(
            formItem.hsjcsj,
            'yyyy-MM-dd HH:mm:ss'
          )
        } else {
          delete formItem.hsjcsj
        }

        formItem.paramList = []
        if (formItem.is_healthy == '0') {
          formItem.thirty_days_symptom =
            formItem.thirty_days_symptomArr.join(',')
          delete formItem.health_code_image
        } else if (formItem.is_healthy == '1') {
          delete formItem.thirty_days_symptom
        }
        if (formItem.is_in_dl == '0') {
          delete formItem.dl_is_go_out
          delete formItem.dl_go_out_place
          delete formItem.dl_domestic_specific_place
          delete formItem.dl_abroad_specific_place
          delete formItem.dl_estimate_leave_time
          delete formItem.dl_leave_reason
          delete formItem.dl_is_school_filling
          delete formItem.dl_flq_is_community_filling
          delete formItem.dl_lately_return_time
          delete formItem.dl_return_traffic_mode
          delete formItem.dl_return_shift
          delete formItem.mask_reserve
          delete formItem.is_oneself_fill_in
          delete formItem.filled_by_name
          delete formItem.filled_by_tel
          delete formItem.filled_by_relationship

          if (
            formItem.return_traffic_mode == '5' ||
            formItem.return_traffic_mode == '6'
          ) {
            delete formItem.return_shift
          }

          if (formItem.out_of_place == '1') {
            delete formItem.abroad_specific_place
            formItem.new_domestic_specific_placeArr = []
            formItem.domestic_specific_placeArr.forEach((item) => {
              formItem.new_domestic_specific_placeArr.push(item.value)
            })
            formItem.domestic_specific_place = JSON.stringify(
              formItem.new_domestic_specific_placeArr
            )
          } else if (formItem.out_of_place == '2') {
            delete formItem.domestic_specific_place
            formItem.abroad_specific_place = JSON.stringify(
              formItem.abroad_specific_placeArr
            )
          }
        } else if (formItem.is_in_dl == '1') {
          delete formItem.out_of_place
          delete formItem.domestic_specific_place
          delete formItem.abroad_specific_place
          delete formItem.estimate_leave_time
          delete formItem.leave_reason
          delete formItem.is_school_filling
          delete formItem.estimate_return_time
          delete formItem.return_traffic_mode
          delete formItem.return_shift

          if (formItem.dl_is_go_out == '0') {
            delete formItem.dl_go_out_place
            delete formItem.dl_domestic_specific_place
            delete formItem.dl_abroad_specific_place
            delete formItem.dl_estimate_leave_time
            delete formItem.dl_leave_reason
            delete formItem.dl_is_school_filling
            delete formItem.dl_flq_is_community_filling
            delete formItem.dl_lately_return_time
            delete formItem.dl_return_traffic_mode
            delete formItem.dl_return_shift

            if (formItem.is_oneself_fill_in == '0') {
              delete formItem.filled_by_nameform
              delete formItem.filled_by_tel
              delete formItem.filled_by_relationship
            }
          } else if (formItem.dl_is_go_out == '1') {
            delete formItem.mask_reserve
            delete formItem.is_oneself_fill_in
            delete formItem.filled_by_name
            delete formItem.filled_by_tel
            delete formItem.filled_by_relationship

            if (
              formItem.dl_return_traffic_mode == '5' ||
              formItem.dl_return_traffic_mode == '6'
            ) {
              delete formItem.dl_return_shift
            }

            if (formItem.dl_go_out_place == '1') {
              delete formItem.dl_abroad_specific_place
              formItem.new_dl_domestic_specific_placeArr = []
              formItem.dl_domestic_specific_placeArr.forEach((item) => {
                formItem.new_dl_domestic_specific_placeArr.push(item.value)
              })
              formItem.dl_domestic_specific_place = JSON.stringify(
                formItem.new_dl_domestic_specific_placeArr
              )
            } else if (formItem.dl_go_out_place == '2') {
              delete formItem.dl_domestic_specific_place
              formItem.dl_abroad_specific_place = JSON.stringify(
                formItem.dl_abroad_specific_placeArr
              )
            }
          }
        }
        if (
          formItem.dl_is_has_quarantine == '1' ||
          formItem.dl_is_has_quarantine == '2'
        ) {
          delete formItem.dl_is_nucleic_acid_test
          delete formItem.dl_is_serum_test
        } else if (formItem.dl_is_has_quarantine == '3') {
          delete formItem.dl_isolation_mode
          delete formItem.dl_isolation_start_time
          delete formItem.dl_isolation_end_time
        }
        formItem.contact_situation = formItem.contact_situationArr.join(',')
        this.fillingList.forEach((fillingItem) => {
          const { key_num } = fillingItem
          formItem.paramList.push({
            id: fillingItem.id,
            filling_contents: fillingItem.filling_contents,
            [key_num]: formItem[fillingItem.key_num],
          })
        })
        formItem.param = JSON.stringify(formItem.paramList)
      })

      // 提交
      this.$dialog
        .confirm({
          title: '是否确认提交',
          message: '',
          confirmButtonText: '确认',
          cancelButtonText: '取消',
          confirmButtonColor: '#D58913',
          beforeClose: async (action, done) => {
            if (action === 'confirm') {
              let list = []
              if (this.route.dateList) {
                JSON.parse(this.route.dateList).map((item) => {
                  this.formData[0].c_date = item.date
                  this.formData[0].date = item.date.split('-').join('')
                  this.formData[0].fill_up_sign = '1'
                  list.push({ ...this.formData[0] })
                })
              } else {
                list = this.formData
              }
              const insertData = await saveHealthInfo({ list: list })
              if (insertData.data.errcode == 0) {
                this.$toast('操作成功')
                setTimeout(() => {
                  // this.$router.go(-1)
                  this.$router.push({
                    path: '/school',
                    query: {
                      ...this.$store.state.user.userInfo,
                    },
                  })
                }, 500)
                done()
              } else {
                this.$toast(insertData.data.errmsg)
                done()
              }
            } else {
              done()
            }
          },
        })
        .catch(() => {})
    },
  },
}
</script>

<style lang="less" scoped>
.container /deep/ .van-checkbox {
  min-height: 30px;
}

.container /deep/ .van-field__label span {
  display: inline-block;
  padding-left: 5px;
  width: 82%;
  text-align-last: justify;
}

/deep/.van-cell--required::before {
  top: calc(50% - 8px);
}

.container {
  background: url('../../assets/images/school/bg_health.jpg') no-repeat;
  background-size: contain;
  //background: #F2F7FB;
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
  color: black;

  &-inner {
    padding: 130px 20px 50px;
    overflow: auto;

    .card {
      background: inherit;

      &-container {
        border-radius: 10px;
        overflow: hidden;
        background-color: white;
        padding: 10px;

        &-item {
          margin-bottom: 10px;
        }

        &-item:not(:last-child) {
          border-bottom: 1px solid #ebedf0;
        }
      }

      &-item {
        &-subtitle {
          padding: 0px 5px;
          font-size: 15px;
          margin-bottom: 5px;
        }

        &-label {
          color: #a0a0a0;
          font-size: 14px;
          position: relative;
          padding-left: 20px;
          padding-right: 10px;
        }

        &-label::before {
          position: absolute;
          left: 8px;
          color: #ee0a24;
          font-size: 14px;
          content: '*';
        }
      }

      &-gtjzz {
        display: flex;
        justify-content: space-between;

        &-btn {
          border-radius: 5px;
        }
      }
    }
  }

  .footer {
    padding: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;

    &-content {
      width: 80%;
      display: inline-block;
      text-align: center;

      & > div {
        display: inline-block;
        color: #bbb;
        font-weight: bold;
      }
    }

    &::before,
    &::after {
      content: '';
      width: 10%;
      border-top: 1px #bbb solid;
      display: inline-block;
      vertical-align: middle;
    }
  }

  .bottom-bar {
    background-color: #fff;
    position: fixed;
    bottom: 0;
    width: 100%;
  }

  .residentlist {
    display: flex;
    justify-content: flex-start;
    flex-flow: wrap;
    align-items: center;
    padding-top: 10px;

    &-item {
      box-sizing: border-box;
      padding: 5px;
      width: 100%;
      text-align: center;
      border: 1px solid #898989;
      border-radius: 10px;
      margin: 10px 0;
      cursor: pointer;

      &-bottom {
        display: flex;
        justify-content: space-around;
        margin-top: 20px;

        &-btn {
          width: 40%;
          border-radius: 5px;
        }
      }

      .desc {
        margin-top: 10px;
        font-weight: 400;
        font-size: 20px;
        text-align: left;
        color: #b4b4b4;
      }

      &-active {
        box-shadow: 0px 0px 5px 3px rgba(255, 145, 0, 0.8);
        border: 1px solid #ff9100;
      }
    }
  }
}

.tag {
  margin-left: 10px;
  padding: 2px 5px;
  width: auto;
  height: auto;
  font-size: 12px;
  border-radius: 3px;
  text-align: center;
  background: rgba(211, 211, 211, 0.5);
  border: 1px solid grey;
  color: grey;
}

.coll_flex {
  display: flex;
  flex-direction: column-reverse;
}

/deep/ .van-collapse-item__content {
  padding: 12px 0px;
}

/deep/ .van-collapse-item__title .van-cell__right-icon::before {
  -webkit-transform: rotate(-90deg);
  transform: rotate(-90deg);
}

/deep/ .van-collapse-item__title--expanded .van-cell__right-icon::before {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}

.address-card {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.address-addbtn {
  width: 80%;
}

.message-card {
  max-height: 70vh;
  padding: 0 20px;
  overflow: auto;
}

.message-title {
  padding: 10px 0;
  text-align: center;
  font-weight: 600;
}

.field-title {
  display: inline-block;
  padding: 0 5px;
  font-size: 12px;
  width: 100%;
  text-align-last: justify;
  text-align: justify;
  box-sizing: border-box;
  line-height: 0px !important;
}

.field-title:after {
  content: '';
  display: inline-block;
  width: 100%;
  overflow: hidden;
}

.field-text {
  padding: 0 5px;
  font-size: 12px;
}

.container {
  .residentlist-item-bottom-btn {
    width: 30%;
  }
}
</style>
